回答編集履歴

2

修正

2020/01/03 01:49

投稿

madone99
madone99

スコア1855

test CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ```css
6
6
 
7
- .bg-img::before {
7
+ .bg_img::before {
8
8
 
9
9
  background:url('http://sample.com/img.jpg') no-repeat left top;
10
10
 

1

修正

2020/01/03 01:49

投稿

madone99
madone99

スコア1855

test CHANGED
@@ -1,5 +1,31 @@
1
- 画像へのパスが合っるか確認てみて下さい
1
+ 疑似要素で表示しょうか
2
2
 
3
3
 
4
4
 
5
+ ```css
6
+
7
+ .bg-img::before {
8
+
5
- `background-image:url(http://〇〇/〇〇.jpg);`
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
+ ```