回答編集履歴
2
修正
test
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
```css
|
6
6
|
|
7
|
-
.bg
|
7
|
+
.bg_img::before {
|
8
8
|
|
9
9
|
background:url('http://sample.com/img.jpg') no-repeat left top;
|
10
10
|
|
1
修正
test
CHANGED
@@ -1,5 +1,31 @@
|
|
1
|
-
|
1
|
+
疑似要素で表示してみるとかでしょうか。
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
+
```css
|
6
|
+
|
7
|
+
.bg-img::before {
|
8
|
+
|
5
|
-
|
9
|
+
background:url('http://sample.com/img.jpg') no-repeat left top;
|
10
|
+
|
11
|
+
background-size: 100% auto;
|
12
|
+
|
13
|
+
display: block;
|
14
|
+
|
15
|
+
position: fixed;
|
16
|
+
|
17
|
+
top: 0;
|
18
|
+
|
19
|
+
left: 0;
|
20
|
+
|
21
|
+
width: 100%;
|
22
|
+
|
23
|
+
height: 100%;
|
24
|
+
|
25
|
+
content: “”;
|
26
|
+
|
27
|
+
z-index: -1;
|
28
|
+
|
29
|
+
}
|
30
|
+
|
31
|
+
```
|