質問編集履歴

1

やりたいことの内容を追加、HTMLファイルの追加、CSSの伝えたい部分(重要なところか定かではない)のみ追加しました。

2020/04/24 15:46

投稿

Garu-san
Garu-san

スコア13

test CHANGED
File without changes
test CHANGED
@@ -1,505 +1,481 @@
1
- - やりたいこと
1
+ <やりたいこと>
2
-
2
+
3
-   グリッドレイアウトをブレークポイントに併せて変更し、レスポンシブデザインを実装する
3
+ - グリッドレイアウトをブレークポイントに併せて変更し、レスポンシブデザインを実装する
4
+
4
-
5
+ - @media (min-width: 320px), @media (min-width: 480px), @media (min-width: 768px), @media (min-width: 992px), @media (min-width: 1100px)を用いて実装したい。
6
+
7
+
8
+
9
+
10
+
5
- - 用件
11
+ <用件>
6
12
 
7
13
    xs: 480px未満 sm: 480px以上768px未満 md: 768px以上992px未満 lg: 992px以上1100px未満 xl: 1100px以上
8
14
 
15
+
16
+
17
+
18
+
19
+ ```HTML
20
+
21
+ <!DOCTYPE html>
22
+
23
+ <html lang="en">
24
+
25
+ <head>
26
+
27
+ <meta charset="utf-8">
28
+
29
+ <title>Class 8 チャレンジ</title>
30
+
31
+ <!-- viewport -->
32
+
33
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
34
+
35
+ <!-- css file -->
36
+
37
+ <link rel="stylesheet" href="styles.css" />
38
+
39
+ <!-- fonts -->
40
+
41
+ <link href="https://fonts.googleapis.com/css?family=Encode+Sans+Expanded" rel="stylesheet">
42
+
43
+ <link href="https://fonts.googleapis.com/css?family=Encode+Sans+Expanded|Lora" rel="stylesheet">
44
+
45
+ </head>
46
+
47
+ <body>
48
+
49
+ <!-- top main start -->
50
+
51
+ <section class="top-main-wrapper">
52
+
53
+ <div class="top-main full-width-container">
54
+
55
+ <div class="row">
56
+
57
+ <div class="column-12">
58
+
59
+ <div class="top-main-content">
60
+
61
+ <h2>TOP MAIN</h2>
62
+
63
+ <h1>CodeGrit : GRID SAMPLE</h1>
64
+
65
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
66
+
67
+ magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
68
+
69
+ consequat.</p>
70
+
71
+ </div>
72
+
73
+ </div>
74
+
75
+ </div>
76
+
77
+ </div>
78
+
79
+ </section>
80
+
81
+ <!-- top main end -->
82
+
83
+ <!-- middle section start -->
84
+
85
+ <section class="middle-section-wrapper">
86
+
87
+ <div class="full-width-container">
88
+
89
+ <div class="row middle-columns">
90
+
91
+ <div class="bg-shose column-4">
92
+
93
+ </div>
94
+
95
+ <div class="column-4">
96
+
97
+ <div class="middle-column-content">
98
+
99
+ <h3>MIDDLE COLUMUN</h3>
100
+
101
+ <h2>
102
+
103
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit,
104
+
105
+ </h2>
106
+
107
+ <p>
108
+
109
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
110
+
111
+ magna
112
+
113
+ aliqua.
114
+
115
+ </p>
116
+
117
+ </div>
118
+
119
+ </div>
120
+
121
+ <div class="bg-sunglasses column-4">
122
+
123
+ </div>
124
+
125
+ </div>
126
+
127
+ </div>
128
+
129
+ <div class="full-width-container">
130
+
131
+ <div class="row middle-columns">
132
+
133
+ <div class="column-4">
134
+
135
+ <div class="middle-column-content">
136
+
137
+ <h3>MIDDLE COLUMUN</h3>
138
+
139
+ <h2>
140
+
141
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit,
142
+
143
+ </h2>
144
+
145
+ <p>
146
+
147
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
148
+
149
+ magna
150
+
151
+ aliqua.
152
+
153
+ </p>
154
+
155
+ </div>
156
+
157
+ </div>
158
+
159
+ <div class="bg-guy-with-cap column-4">
160
+
161
+ </div>
162
+
163
+ <div class="column-4">
164
+
165
+ <div class="middle-column-content">
166
+
167
+ <h3>MIDDLE COLUMUN</h3>
168
+
169
+ <h2>
170
+
171
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit,
172
+
173
+ </h2>
174
+
175
+ <p>
176
+
177
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
178
+
179
+ magna
180
+
181
+ aliqua.
182
+
183
+ </p>
184
+
185
+ </div>
186
+
187
+ </div>
188
+
189
+ </div>
190
+
191
+ </div>
192
+
193
+ </section>
194
+
195
+ <!-- middle section end -->
196
+
197
+ <!-- middle label start -->
198
+
199
+ <section class="middle-label-wrapper">
200
+
201
+ <div class="full-width-container">
202
+
203
+ <div class="row">
204
+
205
+ <div class="column-12">
206
+
207
+ <div class="middle-label">
208
+
209
+ <h2>MIDDLE LABEL</h2>
210
+
211
+ <h3>
212
+
213
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
214
+
215
+ </h3>
216
+
217
+ </div>
218
+
219
+ </div>
220
+
221
+ </div>
222
+
223
+ </div>
224
+
225
+ </section>
226
+
227
+ <!-- middle label end -->
228
+
229
+ <!-- bottom section start -->
230
+
231
+ <section class="bottom-section-wrapper">
232
+
233
+ <div class="container">
234
+
235
+ <div class="row">
236
+
237
+ <div class="column-12">
238
+
239
+ <h2 class="bottom-section-title">BOTTOM SECTION</h2>
240
+
241
+ </div>
242
+
243
+ </div>
244
+
245
+ <div class="row">
246
+
247
+ <div class="column-6">
248
+
249
+ <img src="./images/nick-karvounis-261181.jpg" alt="bottom-section-img" />
250
+
251
+ </div>
252
+
253
+ <div class="column-6">
254
+
255
+ <div class="bottom-section-content-wrapper">
256
+
257
+ <h2>SECTION TITLE</h2>
258
+
259
+ <p>
260
+
261
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
262
+
263
+ aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
264
+
265
+ Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
266
+
267
+ occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
268
+
269
+ </p>
270
+
271
+ </div>
272
+
273
+ </div>
274
+
275
+ </div>
276
+
277
+ <div class="row">
278
+
279
+ <div class="column-6">
280
+
281
+ <div class="bottom-section-content-wrapper">
282
+
283
+ <h2>SECTION TITLE</h2>
284
+
285
+ <p>
286
+
287
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
288
+
289
+ aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
290
+
291
+ Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
292
+
293
+ occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
294
+
295
+ </p>
296
+
297
+ </div>
298
+
299
+ </div>
300
+
301
+ <div class="column-6">
302
+
303
+ <img src="./images/kristian-egelund-476932.jpg" alt="bottom-section-img" />
304
+
305
+ </div>
306
+
307
+ </div>
308
+
309
+ </div>
310
+
311
+ </section>
312
+
313
+ <!-- bottom section end -->
314
+
315
+ <!-- footer start -->
316
+
317
+ <footer class="footer">
318
+
319
+ <div class="full-width-container">
320
+
321
+ <div class="row">
322
+
323
+ <div class="column-12">
324
+
325
+ <h2>FOOTER</h2>
326
+
327
+ <h1>CodeGrit : GRID SAMPLE</h1>
328
+
329
+ </div>
330
+
331
+ </div>
332
+
333
+ </div>
334
+
335
+ </footer>
336
+
337
+ <!-- footer end -->
338
+
339
+ </body>
340
+
341
+ </html>
342
+
343
+ ```
344
+
345
+
346
+
347
+ column setting のみ
348
+
9
349
  ```css
10
350
 
11
- @charset "UTF-8";
12
-
13
-
14
-
15
- * {
16
-
17
- box-sizing: border-box;
18
-
19
- margin: 0;
20
-
21
- padding: 0;
22
-
23
- }
24
-
25
-
26
-
27
- body {
351
+ /*
28
-
29
- font-family: 'Encode Sans Expanded', sans-serif;
352
+
30
-
31
- line-height: 1.5;
32
-
33
- color: #111;
353
+ * column settings
34
-
354
+
35
- font-size: 15px;
355
+ */
36
-
37
- }
356
+
38
-
39
-
40
-
41
- .top-main-wrapper {
357
+ .full-width-container {
42
358
 
43
359
  width: 100%;
44
360
 
45
- margin: 0;
46
-
47
- position: relative;
48
-
49
- }
50
-
51
-
52
-
53
- .top-main {
54
-
55
- height: 550px;
56
-
57
- background-image: url(./images/yaoqi-lai-19429.jpg);
58
-
59
- background-repeat: no-repeat;
60
-
61
- background-position: 50% 30%;
62
-
63
- background-size: cover;
64
-
65
- }
66
-
67
-
68
-
69
- /*
70
-
71
- * column settings
72
-
73
- */
74
-
75
- .full-width-container {
361
+ margin: 0 auto;
362
+
363
+ }
364
+
365
+
366
+
367
+ .container {
368
+
369
+ width: 1100px;
370
+
371
+ margin: 0 auto;
372
+
373
+ }
374
+
375
+
376
+
377
+ .row {
378
+
379
+ display: flex;
380
+
381
+ flex-wrap: wrap;
382
+
383
+ }
384
+
385
+
386
+
387
+ .column-1 {
388
+
389
+ width: 8.333%;
390
+
391
+ }
392
+
393
+
394
+
395
+ .column-2 {
396
+
397
+ width: 16.667%;
398
+
399
+ }
400
+
401
+
402
+
403
+ .column-3 {
404
+
405
+ width: 25%;
406
+
407
+ }
408
+
409
+
410
+
411
+ .column-4 {
412
+
413
+ width: 33.333%;
414
+
415
+ }
416
+
417
+
418
+
419
+ .column-5 {
420
+
421
+ width: 41.667%;
422
+
423
+ }
424
+
425
+
426
+
427
+ .column-6 {
428
+
429
+ width: 50%;
430
+
431
+ }
432
+
433
+
434
+
435
+ .column-7 {
436
+
437
+ width: 58.333%;
438
+
439
+ }
440
+
441
+
442
+
443
+ .column-8 {
444
+
445
+ width: 66.667%;
446
+
447
+ }
448
+
449
+
450
+
451
+ .column-9 {
452
+
453
+ width: 75%;
454
+
455
+ }
456
+
457
+
458
+
459
+ .column-10 {
460
+
461
+ width: 83.333%;
462
+
463
+ }
464
+
465
+
466
+
467
+ .column-11 {
468
+
469
+ width: 91.667%;
470
+
471
+ }
472
+
473
+
474
+
475
+ .column-12 {
76
476
 
77
477
  width: 100%;
78
478
 
79
- margin: 0 auto;
80
-
81
- }
82
-
83
-
84
-
85
- .container {
86
-
87
- width: 1100px;
88
-
89
- margin: 0 auto;
90
-
91
- }
92
-
93
-
94
-
95
- .row {
96
-
97
- display: flex;
98
-
99
- flex-wrap: wrap;
100
-
101
- }
102
-
103
-
104
-
105
- .column-1 {
106
-
107
- width: 8.333%;
108
-
109
- }
110
-
111
-
112
-
113
- .column-2 {
114
-
115
- width: 16.667%;
116
-
117
- }
118
-
119
-
120
-
121
- .column-3 {
122
-
123
- width: 25%;
124
-
125
- }
126
-
127
-
128
-
129
- .column-4 {
130
-
131
- width: 33.333%;
132
-
133
- }
134
-
135
-
136
-
137
- .column-5 {
138
-
139
- width: 41.667%;
140
-
141
- }
142
-
143
-
144
-
145
- .column-6 {
146
-
147
- width: 50%;
148
-
149
- }
150
-
151
-
152
-
153
- .column-7 {
154
-
155
- width: 58.333%;
156
-
157
- }
158
-
159
-
160
-
161
- .column-8 {
162
-
163
- width: 66.667%;
164
-
165
- }
166
-
167
-
168
-
169
- .column-9 {
170
-
171
- width: 75%;
172
-
173
- }
174
-
175
-
176
-
177
- .column-10 {
178
-
179
- width: 83.333%;
180
-
181
- }
182
-
183
-
184
-
185
- .column-11 {
186
-
187
- width: 91.667%;
188
-
189
- }
190
-
191
-
192
-
193
- .column-12 {
194
-
195
- width: 100%;
196
-
197
- }
198
-
199
-
200
-
201
- /*
202
-
203
- * main top
204
-
205
- */
206
-
207
-
208
-
209
- .top-main {
210
-
211
- color: #ffffff;
212
-
213
- }
214
-
215
-
216
-
217
- .top-main h2 {
218
-
219
- text-align: center;
220
-
221
- padding: 30px 0 0 0;
222
-
223
- }
224
-
225
-
226
-
227
- .top-main h1 {
228
-
229
- text-align: center;
230
-
231
- margin: 150px 0 0 0;
232
-
233
- font-size: 60px;
234
-
235
- font-weight: 100;
236
-
237
- font-family: 'Encode Sans Expanded', sans-serif;
238
-
239
- font-family: 'Lora', serif;
240
-
241
- border-bottom: 1px solid #ffffff;
242
-
243
- }
244
-
245
-
246
-
247
- .top-main p {
248
-
249
- text-align: center;
250
-
251
- margin: 20px 250px 10px 250px;
252
-
253
- font-family: 'Encode Sans Expanded', sans-serif;
254
-
255
- font-family: 'Lora', serif;
256
-
257
- }
258
-
259
-
260
-
261
- /*
262
-
263
- * middle section
264
-
265
- */
266
-
267
-
268
-
269
- .bg-shose {
270
-
271
- background-image: url("./images/alex-jones-1248.jpg");
272
-
273
- background-repeat: no-repeat;
274
-
275
- background-position: 50%;
276
-
277
- background-size: cover;
278
-
279
- max-height: 450px;
280
-
281
- }
282
-
283
-
284
-
285
- .bg-sunglasses {
286
-
287
- background-image: url("./images/jamie-brown-68119.jpg");
288
-
289
- background-repeat: no-repeat;
290
-
291
- background-position: 50%;
292
-
293
- background-size: cover;
294
-
295
- max-height: 450px;
296
-
297
- }
298
-
299
-
300
-
301
- .bg-guy-with-cap {
302
-
303
- background-image: url("./images/andre-hunter-111247.jpg");
304
-
305
- background-repeat: no-repeat;
306
-
307
- background-position: 50%;
308
-
309
- background-size: cover;
310
-
311
- max-height: 450px;
312
-
313
- }
314
-
315
-
316
-
317
- .middle-column-content {
318
-
319
- padding: 20px;
320
-
321
- }
322
-
323
-
324
-
325
- .middle-columns {
326
-
327
- height: 400px;
328
-
329
- }
330
-
331
-
332
-
333
- .middle-columns h2 {
334
-
335
- text-align: center;
336
-
337
- margin-bottom: 30px;
338
-
339
- font-weight: 600;
340
-
341
- }
342
-
343
-
344
-
345
- .middle-columns h3 {
346
-
347
- text-align: center;
348
-
349
- margin-top: 30px;
350
-
351
- margin-bottom: 50px;
352
-
353
- color: rgb(133, 152, 206);
354
-
355
- }
356
-
357
-
358
-
359
- .middle-columns p {
360
-
361
- text-align: center;
362
-
363
- }
364
-
365
-
366
-
367
- /*
368
-
369
- * middle label
370
-
371
- */
372
-
373
-
374
-
375
- .middle-label {
376
-
377
- background-color: rgb(236, 236, 236);
378
-
379
- }
380
-
381
-
382
-
383
- .middle-label h3 {
384
-
385
- text-align: center;
386
-
387
- padding: 50px;
388
-
389
- font-size: 60px;
390
-
391
- font-weight: 100;
392
-
393
- font-family: 'Encode Sans Expanded', sans-serif;
394
-
395
- font-family: 'Lora', serif;
396
-
397
- }
398
-
399
-
400
-
401
- .middle-label h2 {
402
-
403
- text-align: center;
404
-
405
- padding: 60px 0 0 0;
406
-
407
- color: rgb(133, 152, 206);
408
-
409
- }
410
-
411
-
412
-
413
- /*
414
-
415
- * bottom section
416
-
417
- */
418
-
419
-
420
-
421
- .bottom-section-title {
422
-
423
- font-size: 2em;
424
-
425
- font-weight: 600;
426
-
427
- text-align: center;
428
-
429
- color: rgb(133, 152, 206);
430
-
431
- margin: 30px 0 40px 0;
432
-
433
- }
434
-
435
-
436
-
437
- .bottom-section-content-wrapper {
438
-
439
- padding: 20px;
440
-
441
- }
442
-
443
-
444
-
445
- .bottom-section-content-wrapper h2{
446
-
447
- font-size: 2em;
448
-
449
- font-weight: 600;
450
-
451
- margin-bottom: 30px;
452
-
453
- }
454
-
455
-
456
-
457
- /*
458
-
459
- * footer
460
-
461
- */
462
-
463
-
464
-
465
- .footer {
466
-
467
- height: 400px;
468
-
469
- background-color: #000000;
470
-
471
- color: #ffffff;
472
-
473
- }
474
-
475
-
476
-
477
- .footer h2 {
478
-
479
- text-align: center;
480
-
481
- padding: 60px 0 0 0;
482
-
483
- }
484
-
485
-
486
-
487
- .footer h1 {
488
-
489
- text-align: center;
490
-
491
- margin: 80px 0 0 0;
492
-
493
- font-size: 60px;
494
-
495
- font-weight: 300;
496
-
497
- font-family: 'Encode Sans Expanded', sans-serif;
498
-
499
- font-family: 'Lora', serif;
500
-
501
- border-bottom: 1px solid #ffffff;
502
-
503
479
  }
504
480
 
505
481
  ```