回答編集履歴

1

コード修正

2020/07/01 13:18

投稿

hatena19
hatena19

スコア33620

test CHANGED
@@ -28,9 +28,7 @@
28
28
 
29
29
  }
30
30
 
31
- .box::before {
31
+ .box::before,.box::after {
32
-
33
- z-index: 0;
34
32
 
35
33
  content: "";
36
34
 
@@ -46,31 +44,19 @@
46
44
 
47
45
  bottom: 0;
48
46
 
47
+ }
48
+
49
+ .box::before {
50
+
49
- background-color:rgba(0,0,0,0.5);
51
+ background-color:rgba(0,0,0,0.5);
50
52
 
51
53
  }
52
54
 
53
-
54
-
55
55
  .box::after {
56
-
57
- content: "";
58
-
59
- display: block;
60
-
61
- position: absolute;
62
-
63
- top: 0;
64
-
65
- left: 0;
66
-
67
- right: 0;
68
-
69
- bottom: 0;
70
56
 
71
57
  background-image: url(画像パス);
72
58
 
73
- clip-path: inset(30% 20% 30% 40%);
59
+ clip-path: inset(30% 20% 30% 40%); /* お好みに切り抜いてください */
74
60
 
75
61
  }
76
62