質問編集履歴

1

コードの追加

2018/06/24 12:18

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -29,3 +29,251 @@
29
29
  子要素がrelativeでも各子要素がheight指定がない限り
30
30
 
31
31
  次の要素が上がってきちゃうのでしょうか?
32
+
33
+
34
+
35
+ 現状はなぜかsection5が勝手に上がってきてるので、
36
+
37
+ margin-topでその分入れてますが、
38
+
39
+ relativeで入れたのにmarginでそこを確保すべきなのか?
40
+
41
+ コードで間違いがあったのかなと思い、
42
+
43
+ 質問させて頂きます・・・。
44
+
45
+
46
+
47
+ ```html
48
+
49
+ <section id="section4">
50
+
51
+ <h2>Interview</h2>
52
+
53
+ <figure id="people-img">
54
+
55
+ <img src="image/index/index_img09.png">
56
+
57
+ </figure>
58
+
59
+ <div id="people-area">
60
+
61
+ <a href="#" class="pic" id="pic01">
62
+
63
+ <div class="a-hover"></div>
64
+
65
+ <p>01</p>
66
+
67
+ <div class="animated">
68
+
69
+ <img src="image/index/index_img10.png">
70
+
71
+ </div>
72
+
73
+ <div class="shadow">
74
+
75
+ <div class="shadow-in">
76
+
77
+ 一番目の人
78
+
79
+ </div>
80
+
81
+ </div>
82
+
83
+ </a>
84
+
85
+ <a href="#" class="pic" id="pic02">
86
+
87
+ <div class="a-hover"></div>
88
+
89
+ <p>02</p>
90
+
91
+ <div class="animated">
92
+
93
+ <img src="image/index/index_img11.png">
94
+
95
+ </div>
96
+
97
+ <div class="shadow">
98
+
99
+ <div class="shadow-in">
100
+
101
+ 二番目の人
102
+
103
+ </div>
104
+
105
+ </div>
106
+
107
+ </a>
108
+
109
+ <a href="#" class="pic" id="pic03">
110
+
111
+ <div class="a-hover"></div>
112
+
113
+ <p>03</p>
114
+
115
+ <div class="animated">
116
+
117
+ <img src="image/index/index_img12.png">
118
+
119
+ </div>
120
+
121
+ <div class="shadow">
122
+
123
+ <div class="shadow-in">
124
+
125
+ 三番目の人
126
+
127
+ </div>
128
+
129
+ </div>
130
+
131
+ </a>
132
+
133
+ <a href="#" class="pic" id="pic04">
134
+
135
+ <div class="a-hover"></div>
136
+
137
+ <p>04</p>
138
+
139
+ <div class="animated">
140
+
141
+ <img src="image/index/index_img13.png">
142
+
143
+ </div>
144
+
145
+ <div class="shadow">
146
+
147
+ <div class="shadow-in">
148
+
149
+ 4番目の人
150
+
151
+ </div>
152
+
153
+ </div>
154
+
155
+ </a>
156
+
157
+ </section>
158
+
159
+ <section id="section5"></section>
160
+
161
+ ```
162
+
163
+ ```css
164
+
165
+ #section4 {
166
+
167
+ width: 1220px;
168
+
169
+ margin: 0 auto;
170
+
171
+ position: relative;
172
+
173
+ padding-top: 400px;
174
+
175
+ height: auto;
176
+
177
+ }
178
+
179
+ #section4 h2 {
180
+
181
+ font-size: 11.4rem;
182
+
183
+ letter-spacing: 0.16em;
184
+
185
+ text-align: center;
186
+
187
+ position: relative;
188
+
189
+ z-index: 1010;
190
+
191
+ }
192
+
193
+ #section4 #people-area {
194
+
195
+ width: 1100px;
196
+
197
+ margin: 0 auto;
198
+
199
+ display: flex;
200
+
201
+ flex-wrap: wrap;
202
+
203
+ position: relative;
204
+
205
+ flex-direction: row;
206
+
207
+ }
208
+
209
+ #section4 #people-img {
210
+
211
+ right: 25px;
212
+
213
+ position: absolute;
214
+
215
+ z-index: 10;
216
+
217
+ top: 370px;
218
+
219
+ }
220
+
221
+ #section4 #people-area #pic01 {
222
+
223
+ position: relative;
224
+
225
+ left: 70px;
226
+
227
+ top: 280px;
228
+
229
+ }
230
+
231
+ #section4 #people-area #pic02 {
232
+
233
+ position: relative;
234
+
235
+ right: 0px;
236
+
237
+ top: 670px;
238
+
239
+ z-index: 1000;
240
+
241
+ }
242
+
243
+ #section4 #people-area #pic03 {
244
+
245
+ position: relative;
246
+
247
+ left: 10px;
248
+
249
+ top: 1120px;
250
+
251
+ }
252
+
253
+ #section4 #people-area #pic04 {
254
+
255
+ position: relative;
256
+
257
+ right: 70px;
258
+
259
+ top: 1340px;
260
+
261
+ z-index: 1000;
262
+
263
+ }
264
+
265
+ #section5 {
266
+
267
+ margin-top: 1900px;
268
+
269
+ position: relative;
270
+
271
+ background-color: #fff;
272
+
273
+ height: 986px;
274
+
275
+ width: 100%;
276
+
277
+ }
278
+
279
+ ```