質問編集履歴
1
コードの修正をしました
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
親要素で指示したものが、全ての子要素ではなく一部の子要素に効いてしまうのですが、何故でしょうか。
|
2
2
|
|
3
|
-
クラスexample imgで指定したサイズを全ての子要素に反映させたい(クラスtokyo img)が、反映されないのは何故でしょうか。
|
3
|
+
クラスexample imgで指定したサイズを全ての子要素に反映させたい(クラスtokyo img)が、反映されないのは何故でしょうか。
|
4
|
-
|
4
|
+
|
5
|
-
|
5
|
+
```html
|
6
|
-
|
6
|
+
|
7
|
-
|
7
|
+
<!DOCTYPE html>
|
8
8
|
|
9
9
|
<head>
|
10
10
|
|
@@ -88,184 +88,186 @@
|
|
88
88
|
|
89
89
|
</body>
|
90
90
|
|
91
|
+
```
|
92
|
+
|
93
|
+
|
94
|
+
|
91
95
|
```css
|
92
96
|
|
93
|
-
|
97
|
+
*{
|
98
|
+
|
99
|
+
padding:0;
|
100
|
+
|
101
|
+
margin:0;
|
102
|
+
|
103
|
+
}
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
header{
|
108
|
+
|
109
|
+
background-image: url(https://danblog.tokyo/img/building2.png);
|
110
|
+
|
111
|
+
height:550px;
|
112
|
+
|
113
|
+
background-size: cover;
|
114
|
+
|
115
|
+
}
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
header img{
|
120
|
+
|
121
|
+
margin-left:180px;
|
122
|
+
|
123
|
+
margin-top:30px;
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
width: 130px;
|
128
|
+
|
129
|
+
}
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
header ul{
|
134
|
+
|
135
|
+
float:right;
|
136
|
+
|
137
|
+
display:flex;
|
138
|
+
|
139
|
+
margin-top: 50px;
|
140
|
+
|
141
|
+
margin-right: 90px;;
|
142
|
+
|
143
|
+
}
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
header li{
|
148
|
+
|
149
|
+
list-style: none;
|
150
|
+
|
151
|
+
margin-right: 80px;
|
152
|
+
|
153
|
+
}
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
header h1{
|
158
|
+
|
159
|
+
text-align: center;
|
160
|
+
|
161
|
+
padding-top:200px;
|
162
|
+
|
163
|
+
font-size:50px;
|
164
|
+
|
165
|
+
font-family:serif;
|
166
|
+
|
167
|
+
}
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
header img:hover{
|
172
|
+
|
173
|
+
cursor: pointer;
|
174
|
+
|
175
|
+
opacity:0.5;
|
176
|
+
|
177
|
+
}
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
header li:hover{
|
182
|
+
|
183
|
+
cursor: pointer;
|
184
|
+
|
185
|
+
opacity:0.5;
|
186
|
+
|
187
|
+
}
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
.info{
|
192
|
+
|
193
|
+
height:350px;
|
194
|
+
|
195
|
+
}
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
.info h2{
|
200
|
+
|
201
|
+
font-size: 50px;
|
202
|
+
|
203
|
+
text-align: center;
|
204
|
+
|
205
|
+
margin-top: 50px;
|
206
|
+
|
207
|
+
font-family:serif;
|
208
|
+
|
209
|
+
}
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
.info-p{
|
214
|
+
|
215
|
+
margin-top: 40px;
|
216
|
+
|
217
|
+
text-align: center;
|
218
|
+
|
219
|
+
width:30%;
|
220
|
+
|
221
|
+
margin-right:auto;
|
222
|
+
|
223
|
+
margin-left:auto;
|
224
|
+
|
225
|
+
}
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
.info-p p{
|
230
|
+
|
231
|
+
height:50px;
|
232
|
+
|
233
|
+
border-bottom: black 1px solid;
|
234
|
+
|
235
|
+
padding-top: 20px;
|
236
|
+
|
237
|
+
}
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
.example h2{
|
242
|
+
|
243
|
+
text-align: center;
|
244
|
+
|
245
|
+
}
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
.saitama{
|
250
|
+
|
251
|
+
border: black 1px solid;
|
252
|
+
|
253
|
+
}
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
.tokyo{
|
258
|
+
|
259
|
+
border: black 1px solid;
|
260
|
+
|
261
|
+
}
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
.example img{
|
266
|
+
|
267
|
+
width:30%;
|
268
|
+
|
269
|
+
height:30%;
|
270
|
+
|
271
|
+
}
|
94
272
|
|
95
273
|
```
|
96
|
-
|
97
|
-
*{
|
98
|
-
|
99
|
-
padding:0;
|
100
|
-
|
101
|
-
margin:0;
|
102
|
-
|
103
|
-
}
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
header{
|
108
|
-
|
109
|
-
background-image: url(https://danblog.tokyo/img/building2.png);
|
110
|
-
|
111
|
-
height:550px;
|
112
|
-
|
113
|
-
background-size: cover;
|
114
|
-
|
115
|
-
}
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
header img{
|
120
|
-
|
121
|
-
margin-left:180px;
|
122
|
-
|
123
|
-
margin-top:30px;
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
width: 130px;
|
128
|
-
|
129
|
-
}
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
header ul{
|
134
|
-
|
135
|
-
float:right;
|
136
|
-
|
137
|
-
display:flex;
|
138
|
-
|
139
|
-
margin-top: 50px;
|
140
|
-
|
141
|
-
margin-right: 90px;;
|
142
|
-
|
143
|
-
}
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
header li{
|
148
|
-
|
149
|
-
list-style: none;
|
150
|
-
|
151
|
-
margin-right: 80px;
|
152
|
-
|
153
|
-
}
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
header h1{
|
158
|
-
|
159
|
-
text-align: center;
|
160
|
-
|
161
|
-
padding-top:200px;
|
162
|
-
|
163
|
-
font-size:50px;
|
164
|
-
|
165
|
-
font-family:serif;
|
166
|
-
|
167
|
-
}
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
header img:hover{
|
172
|
-
|
173
|
-
cursor: pointer;
|
174
|
-
|
175
|
-
opacity:0.5;
|
176
|
-
|
177
|
-
}
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
header li:hover{
|
182
|
-
|
183
|
-
cursor: pointer;
|
184
|
-
|
185
|
-
opacity:0.5;
|
186
|
-
|
187
|
-
}
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
.info{
|
192
|
-
|
193
|
-
height:350px;
|
194
|
-
|
195
|
-
}
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
.info h2{
|
200
|
-
|
201
|
-
font-size: 50px;
|
202
|
-
|
203
|
-
text-align: center;
|
204
|
-
|
205
|
-
margin-top: 50px;
|
206
|
-
|
207
|
-
font-family:serif;
|
208
|
-
|
209
|
-
}
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
.info-p{
|
214
|
-
|
215
|
-
margin-top: 40px;
|
216
|
-
|
217
|
-
text-align: center;
|
218
|
-
|
219
|
-
width:30%;
|
220
|
-
|
221
|
-
margin-right:auto;
|
222
|
-
|
223
|
-
margin-left:auto;
|
224
|
-
|
225
|
-
}
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
.info-p p{
|
230
|
-
|
231
|
-
height:50px;
|
232
|
-
|
233
|
-
border-bottom: black 1px solid;
|
234
|
-
|
235
|
-
padding-top: 20px;
|
236
|
-
|
237
|
-
}
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
.example h2{
|
242
|
-
|
243
|
-
text-align: center;
|
244
|
-
|
245
|
-
}
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
.saitama{
|
250
|
-
|
251
|
-
border: black 1px solid;
|
252
|
-
|
253
|
-
}
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
.tokyo{
|
258
|
-
|
259
|
-
border: black 1px solid;
|
260
|
-
|
261
|
-
}
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
.example img{
|
266
|
-
|
267
|
-
width:30%;
|
268
|
-
|
269
|
-
height:30%;
|
270
|
-
|
271
|
-
}
|