回答編集履歴
1
コード修正
answer
CHANGED
@@ -13,8 +13,7 @@
|
|
13
13
|
position: relative;
|
14
14
|
background-image: url(画像パス);
|
15
15
|
}
|
16
|
-
.box::before {
|
16
|
+
.box::before,.box::after {
|
17
|
-
z-index: 0;
|
18
17
|
content: "";
|
19
18
|
display: block;
|
20
19
|
position: absolute;
|
@@ -22,19 +21,13 @@
|
|
22
21
|
left: 0;
|
23
22
|
right: 0;
|
24
23
|
bottom: 0;
|
25
|
-
background-color:rgba(0,0,0,0.5);
|
26
24
|
}
|
27
|
-
|
25
|
+
.box::before {
|
26
|
+
background-color:rgba(0,0,0,0.5);
|
27
|
+
}
|
28
28
|
.box::after {
|
29
|
-
content: "";
|
30
|
-
display: block;
|
31
|
-
position: absolute;
|
32
|
-
top: 0;
|
33
|
-
left: 0;
|
34
|
-
right: 0;
|
35
|
-
bottom: 0;
|
36
29
|
background-image: url(画像パス);
|
37
|
-
clip-path: inset(30% 20% 30% 40%);
|
30
|
+
clip-path: inset(30% 20% 30% 40%); /* お好みに切り抜いてください */
|
38
31
|
}
|
39
32
|
```
|
40
33
|
|