質問編集履歴
1
やりたいことの内容を追加、HTMLファイルの追加、CSSの伝えたい部分(重要なところか定かではない)のみ追加しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,37 +1,178 @@
|
|
1
|
-
|
1
|
+
<やりたいこと>
|
2
|
-
|
2
|
+
- グリッドレイアウトをブレークポイントに併せて変更し、レスポンシブデザインを実装する
|
3
|
-
- 用件
|
4
|
-
|
3
|
+
- @media (min-width: 320px), @media (min-width: 480px), @media (min-width: 768px), @media (min-width: 992px), @media (min-width: 1100px)を用いて実装したい。
|
5
|
-
```css
|
6
|
-
@charset "UTF-8";
|
7
4
|
|
8
|
-
* {
|
9
|
-
box-sizing: border-box;
|
10
|
-
margin: 0;
|
11
|
-
padding: 0;
|
12
|
-
}
|
13
5
|
|
14
|
-
body {
|
15
|
-
font-family: 'Encode Sans Expanded', sans-serif;
|
16
|
-
line-height: 1.5;
|
17
|
-
|
6
|
+
<用件>
|
18
|
-
|
7
|
+
xs: 480px未満 sm: 480px以上768px未満 md: 768px以上992px未満 lg: 992px以上1100px未満 xl: 1100px以上
|
19
|
-
}
|
20
8
|
|
21
|
-
.top-main-wrapper {
|
22
|
-
width: 100%;
|
23
|
-
margin: 0;
|
24
|
-
position: relative;
|
25
|
-
}
|
26
9
|
|
10
|
+
```HTML
|
27
|
-
|
11
|
+
<!DOCTYPE html>
|
12
|
+
<html lang="en">
|
28
|
-
|
13
|
+
<head>
|
14
|
+
<meta charset="utf-8">
|
15
|
+
<title>Class 8 チャレンジ</title>
|
16
|
+
<!-- viewport -->
|
17
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
18
|
+
<!-- css file -->
|
19
|
+
<link rel="stylesheet" href="styles.css" />
|
20
|
+
<!-- fonts -->
|
21
|
+
<link href="https://fonts.googleapis.com/css?family=Encode+Sans+Expanded" rel="stylesheet">
|
22
|
+
<link href="https://fonts.googleapis.com/css?family=Encode+Sans+Expanded|Lora" rel="stylesheet">
|
23
|
+
</head>
|
24
|
+
<body>
|
25
|
+
<!-- top main start -->
|
26
|
+
<section class="top-main-wrapper">
|
29
|
-
|
27
|
+
<div class="top-main full-width-container">
|
28
|
+
<div class="row">
|
29
|
+
<div class="column-12">
|
30
|
+
<div class="top-main-content">
|
31
|
+
<h2>TOP MAIN</h2>
|
32
|
+
<h1>CodeGrit : GRID SAMPLE</h1>
|
33
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
34
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
35
|
+
consequat.</p>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
</section>
|
41
|
+
<!-- top main end -->
|
30
|
-
|
42
|
+
<!-- middle section start -->
|
43
|
+
<section class="middle-section-wrapper">
|
44
|
+
<div class="full-width-container">
|
45
|
+
<div class="row middle-columns">
|
46
|
+
<div class="bg-shose column-4">
|
47
|
+
</div>
|
48
|
+
<div class="column-4">
|
49
|
+
<div class="middle-column-content">
|
50
|
+
<h3>MIDDLE COLUMUN</h3>
|
51
|
+
<h2>
|
52
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
|
53
|
+
</h2>
|
54
|
+
<p>
|
55
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
56
|
+
magna
|
57
|
+
aliqua.
|
58
|
+
</p>
|
59
|
+
</div>
|
60
|
+
</div>
|
61
|
+
<div class="bg-sunglasses column-4">
|
62
|
+
</div>
|
63
|
+
</div>
|
64
|
+
</div>
|
65
|
+
<div class="full-width-container">
|
66
|
+
<div class="row middle-columns">
|
67
|
+
<div class="column-4">
|
68
|
+
<div class="middle-column-content">
|
69
|
+
<h3>MIDDLE COLUMUN</h3>
|
70
|
+
<h2>
|
71
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
|
72
|
+
</h2>
|
73
|
+
<p>
|
74
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
75
|
+
magna
|
76
|
+
aliqua.
|
77
|
+
</p>
|
78
|
+
</div>
|
79
|
+
</div>
|
80
|
+
<div class="bg-guy-with-cap column-4">
|
81
|
+
</div>
|
82
|
+
<div class="column-4">
|
83
|
+
<div class="middle-column-content">
|
84
|
+
<h3>MIDDLE COLUMUN</h3>
|
85
|
+
<h2>
|
86
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
|
87
|
+
</h2>
|
88
|
+
<p>
|
89
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
90
|
+
magna
|
91
|
+
aliqua.
|
92
|
+
</p>
|
93
|
+
</div>
|
94
|
+
</div>
|
95
|
+
</div>
|
96
|
+
</div>
|
97
|
+
</section>
|
31
|
-
|
98
|
+
<!-- middle section end -->
|
99
|
+
<!-- middle label start -->
|
100
|
+
<section class="middle-label-wrapper">
|
101
|
+
<div class="full-width-container">
|
102
|
+
<div class="row">
|
103
|
+
<div class="column-12">
|
104
|
+
<div class="middle-label">
|
105
|
+
<h2>MIDDLE LABEL</h2>
|
106
|
+
<h3>
|
107
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
108
|
+
</h3>
|
109
|
+
</div>
|
110
|
+
</div>
|
111
|
+
</div>
|
112
|
+
</div>
|
32
|
-
|
113
|
+
</section>
|
114
|
+
<!-- middle label end -->
|
115
|
+
<!-- bottom section start -->
|
116
|
+
<section class="bottom-section-wrapper">
|
117
|
+
<div class="container">
|
118
|
+
<div class="row">
|
119
|
+
<div class="column-12">
|
120
|
+
<h2 class="bottom-section-title">BOTTOM SECTION</h2>
|
121
|
+
</div>
|
122
|
+
</div>
|
123
|
+
<div class="row">
|
124
|
+
<div class="column-6">
|
125
|
+
<img src="./images/nick-karvounis-261181.jpg" alt="bottom-section-img" />
|
126
|
+
</div>
|
127
|
+
<div class="column-6">
|
128
|
+
<div class="bottom-section-content-wrapper">
|
129
|
+
<h2>SECTION TITLE</h2>
|
130
|
+
<p>
|
131
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
|
132
|
+
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
133
|
+
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
|
134
|
+
occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
135
|
+
</p>
|
136
|
+
</div>
|
137
|
+
</div>
|
138
|
+
</div>
|
139
|
+
<div class="row">
|
140
|
+
<div class="column-6">
|
141
|
+
<div class="bottom-section-content-wrapper">
|
142
|
+
<h2>SECTION TITLE</h2>
|
143
|
+
<p>
|
144
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
|
145
|
+
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
146
|
+
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
|
147
|
+
occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
148
|
+
</p>
|
149
|
+
</div>
|
150
|
+
</div>
|
151
|
+
<div class="column-6">
|
152
|
+
<img src="./images/kristian-egelund-476932.jpg" alt="bottom-section-img" />
|
153
|
+
</div>
|
154
|
+
</div>
|
155
|
+
</div>
|
156
|
+
</section>
|
157
|
+
<!-- bottom section end -->
|
158
|
+
<!-- footer start -->
|
159
|
+
<footer class="footer">
|
160
|
+
<div class="full-width-container">
|
161
|
+
<div class="row">
|
162
|
+
<div class="column-12">
|
163
|
+
<h2>FOOTER</h2>
|
164
|
+
<h1>CodeGrit : GRID SAMPLE</h1>
|
165
|
+
</div>
|
166
|
+
</div>
|
167
|
+
</div>
|
168
|
+
</footer>
|
169
|
+
<!-- footer end -->
|
170
|
+
</body>
|
171
|
+
</html>
|
33
|
-
|
172
|
+
```
|
34
173
|
|
174
|
+
column setting のみ
|
175
|
+
```css
|
35
176
|
/*
|
36
177
|
* column settings
|
37
178
|
*/
|
@@ -97,157 +238,4 @@
|
|
97
238
|
.column-12 {
|
98
239
|
width: 100%;
|
99
240
|
}
|
100
|
-
|
101
|
-
/*
|
102
|
-
* main top
|
103
|
-
*/
|
104
|
-
|
105
|
-
.top-main {
|
106
|
-
color: #ffffff;
|
107
|
-
}
|
108
|
-
|
109
|
-
.top-main h2 {
|
110
|
-
text-align: center;
|
111
|
-
padding: 30px 0 0 0;
|
112
|
-
}
|
113
|
-
|
114
|
-
.top-main h1 {
|
115
|
-
text-align: center;
|
116
|
-
margin: 150px 0 0 0;
|
117
|
-
font-size: 60px;
|
118
|
-
font-weight: 100;
|
119
|
-
font-family: 'Encode Sans Expanded', sans-serif;
|
120
|
-
font-family: 'Lora', serif;
|
121
|
-
border-bottom: 1px solid #ffffff;
|
122
|
-
}
|
123
|
-
|
124
|
-
.top-main p {
|
125
|
-
text-align: center;
|
126
|
-
margin: 20px 250px 10px 250px;
|
127
|
-
font-family: 'Encode Sans Expanded', sans-serif;
|
128
|
-
font-family: 'Lora', serif;
|
129
|
-
}
|
130
|
-
|
131
|
-
/*
|
132
|
-
* middle section
|
133
|
-
*/
|
134
|
-
|
135
|
-
.bg-shose {
|
136
|
-
background-image: url("./images/alex-jones-1248.jpg");
|
137
|
-
background-repeat: no-repeat;
|
138
|
-
background-position: 50%;
|
139
|
-
background-size: cover;
|
140
|
-
max-height: 450px;
|
141
|
-
}
|
142
|
-
|
143
|
-
.bg-sunglasses {
|
144
|
-
background-image: url("./images/jamie-brown-68119.jpg");
|
145
|
-
background-repeat: no-repeat;
|
146
|
-
background-position: 50%;
|
147
|
-
background-size: cover;
|
148
|
-
max-height: 450px;
|
149
|
-
}
|
150
|
-
|
151
|
-
.bg-guy-with-cap {
|
152
|
-
background-image: url("./images/andre-hunter-111247.jpg");
|
153
|
-
background-repeat: no-repeat;
|
154
|
-
background-position: 50%;
|
155
|
-
background-size: cover;
|
156
|
-
max-height: 450px;
|
157
|
-
}
|
158
|
-
|
159
|
-
.middle-column-content {
|
160
|
-
padding: 20px;
|
161
|
-
}
|
162
|
-
|
163
|
-
.middle-columns {
|
164
|
-
height: 400px;
|
165
|
-
}
|
166
|
-
|
167
|
-
.middle-columns h2 {
|
168
|
-
text-align: center;
|
169
|
-
margin-bottom: 30px;
|
170
|
-
font-weight: 600;
|
171
|
-
}
|
172
|
-
|
173
|
-
.middle-columns h3 {
|
174
|
-
text-align: center;
|
175
|
-
margin-top: 30px;
|
176
|
-
margin-bottom: 50px;
|
177
|
-
color: rgb(133, 152, 206);
|
178
|
-
}
|
179
|
-
|
180
|
-
.middle-columns p {
|
181
|
-
text-align: center;
|
182
|
-
}
|
183
|
-
|
184
|
-
/*
|
185
|
-
* middle label
|
186
|
-
*/
|
187
|
-
|
188
|
-
.middle-label {
|
189
|
-
background-color: rgb(236, 236, 236);
|
190
|
-
}
|
191
|
-
|
192
|
-
.middle-label h3 {
|
193
|
-
text-align: center;
|
194
|
-
padding: 50px;
|
195
|
-
font-size: 60px;
|
196
|
-
font-weight: 100;
|
197
|
-
font-family: 'Encode Sans Expanded', sans-serif;
|
198
|
-
font-family: 'Lora', serif;
|
199
|
-
}
|
200
|
-
|
201
|
-
.middle-label h2 {
|
202
|
-
text-align: center;
|
203
|
-
padding: 60px 0 0 0;
|
204
|
-
color: rgb(133, 152, 206);
|
205
|
-
}
|
206
|
-
|
207
|
-
/*
|
208
|
-
* bottom section
|
209
|
-
*/
|
210
|
-
|
211
|
-
.bottom-section-title {
|
212
|
-
font-size: 2em;
|
213
|
-
font-weight: 600;
|
214
|
-
text-align: center;
|
215
|
-
color: rgb(133, 152, 206);
|
216
|
-
margin: 30px 0 40px 0;
|
217
|
-
}
|
218
|
-
|
219
|
-
.bottom-section-content-wrapper {
|
220
|
-
padding: 20px;
|
221
|
-
}
|
222
|
-
|
223
|
-
.bottom-section-content-wrapper h2{
|
224
|
-
font-size: 2em;
|
225
|
-
font-weight: 600;
|
226
|
-
margin-bottom: 30px;
|
227
|
-
}
|
228
|
-
|
229
|
-
/*
|
230
|
-
* footer
|
231
|
-
*/
|
232
|
-
|
233
|
-
.footer {
|
234
|
-
height: 400px;
|
235
|
-
background-color: #000000;
|
236
|
-
color: #ffffff;
|
237
|
-
}
|
238
|
-
|
239
|
-
.footer h2 {
|
240
|
-
text-align: center;
|
241
|
-
padding: 60px 0 0 0;
|
242
|
-
}
|
243
|
-
|
244
|
-
.footer h1 {
|
245
|
-
text-align: center;
|
246
|
-
margin: 80px 0 0 0;
|
247
|
-
font-size: 60px;
|
248
|
-
font-weight: 300;
|
249
|
-
font-family: 'Encode Sans Expanded', sans-serif;
|
250
|
-
font-family: 'Lora', serif;
|
251
|
-
border-bottom: 1px solid #ffffff;
|
252
|
-
}
|
253
241
|
```
|