回答編集履歴
1
コード修正
test
CHANGED
@@ -6,11 +6,13 @@
|
|
6
6
|
要素のbackground-imageは要素からはみ出させることはできないので、疑似要素にbackground-imageを設定する方法になると思います。
|
7
7
|
|
8
8
|
```CSS
|
9
|
+
body {
|
10
|
+
position: relative;
|
11
|
+
}
|
9
12
|
.all_section {
|
10
13
|
width: 90%;
|
11
14
|
max-width: 1240px;
|
12
15
|
margin: 0 auto;
|
13
|
-
position: relative;
|
14
16
|
}
|
15
17
|
.top_works {
|
16
18
|
height: 600px;
|
@@ -19,16 +21,12 @@
|
|
19
21
|
content: "";
|
20
22
|
display: block;
|
21
23
|
position: absolute;
|
22
|
-
left:
|
24
|
+
left: 0;
|
23
|
-
width: 100
|
25
|
+
width: 100%;
|
24
|
-
height:
|
26
|
+
height: 600px;
|
25
27
|
background-image: url(https://picsum.photos/1200/800);
|
26
28
|
background-repeat: no-repeat;
|
27
29
|
background-size: cover;
|
28
30
|
z-index: -1;
|
29
31
|
}
|
30
|
-
body {
|
31
|
-
overflow-x: hidden;
|
32
|
-
}
|
33
|
-
|
34
32
|
```
|