質問編集履歴
1
コードを追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -16,7 +16,69 @@
|
|
16
16
|
|
17
17
|
|
18
18
|
|
19
|
+
##例
|
19
20
|
|
21
|
+
```html
|
22
|
+
|
23
|
+
<div class="parent">
|
24
|
+
|
25
|
+
<p>要素①</p>
|
26
|
+
|
27
|
+
</div>
|
28
|
+
|
29
|
+
```
|
30
|
+
|
31
|
+
```css
|
32
|
+
|
33
|
+
.parent {
|
34
|
+
|
35
|
+
/*親要素relative*/
|
36
|
+
|
37
|
+
position: relative;
|
38
|
+
|
39
|
+
}
|
40
|
+
|
41
|
+
.parent p{
|
42
|
+
|
43
|
+
position: absolute;
|
44
|
+
|
45
|
+
top: 0;
|
46
|
+
|
47
|
+
left: 0;
|
48
|
+
|
49
|
+
}
|
50
|
+
|
51
|
+
```
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
```html
|
56
|
+
|
57
|
+
<div class="parent">
|
58
|
+
|
59
|
+
<p>要素①</p>
|
60
|
+
|
61
|
+
</div>
|
62
|
+
|
63
|
+
```
|
64
|
+
|
65
|
+
```css
|
66
|
+
|
67
|
+
.parent {
|
68
|
+
|
69
|
+
position: relative;
|
70
|
+
|
71
|
+
}
|
72
|
+
|
73
|
+
.parent p::after {
|
74
|
+
|
75
|
+
position: absolute;
|
76
|
+
|
77
|
+
top: 0;
|
78
|
+
|
79
|
+
left: 0;
|
80
|
+
|
81
|
+
```
|
20
82
|
|
21
83
|
|
22
84
|
|