回答編集履歴
1
調整
test
CHANGED
@@ -30,3 +30,31 @@
|
|
30
30
|
</div>
|
31
31
|
<div class="section-bottom"></div>
|
32
32
|
```
|
33
|
+
単純にやるなら.section-topにmargin-bottomを設定するだけでも
|
34
|
+
```CSS
|
35
|
+
<style>
|
36
|
+
.section-top {
|
37
|
+
position: relative;
|
38
|
+
background-color: black;
|
39
|
+
width: 200px;
|
40
|
+
height: 200px;
|
41
|
+
margin-bottom:100px;
|
42
|
+
}
|
43
|
+
.section-top::after {
|
44
|
+
content: "";
|
45
|
+
display: block;
|
46
|
+
width: 100%;
|
47
|
+
height: 150%;
|
48
|
+
background-color: aqua;
|
49
|
+
opacity: 0.5;
|
50
|
+
}
|
51
|
+
|
52
|
+
.section-bottom {
|
53
|
+
width: 200px;
|
54
|
+
height: 200px;
|
55
|
+
background-color: bisque;
|
56
|
+
}
|
57
|
+
</style>
|
58
|
+
<div class="section-top"></div>
|
59
|
+
<div class="section-bottom"></div>
|
60
|
+
```
|