回答編集履歴

2

読みやすく修正。

2016/06/05 15:58

投稿

kei344
kei344

スコア69407

test CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  ```CSS
4
4
 
5
+ /* 修正前のコード */
6
+
5
7
  .content {
6
8
 
7
9
  background-color: blue;
@@ -100,6 +102,10 @@
100
102
 
101
103
 
102
104
 
105
+ ---
106
+
107
+
108
+
103
109
  いくつかミスがあったので修正しました。
104
110
 
105
111
 
@@ -144,6 +150,8 @@
144
150
 
145
151
  ```CSS
146
152
 
153
+ /* 修正後のコード */
154
+
147
155
  .main-container {
148
156
 
149
157
  background-color: black;

1

ミスがあったため修正。

2016/06/05 15:58

投稿

kei344
kei344

スコア69407

test CHANGED
@@ -90,4 +90,154 @@
90
90
 
91
91
  }
92
92
 
93
+ ```
94
+
95
+
96
+
97
+
98
+
99
+ ---
100
+
101
+
102
+
103
+ いくつかミスがあったので修正しました。
104
+
105
+
106
+
107
+ ```HTML
108
+
109
+ <div class="main-container">
110
+
111
+ <div class="header">
112
+
113
+ Header
114
+
115
+ </div>
116
+
117
+ <div class="content">
118
+
119
+ <div class="wrap">
120
+
121
+ <div class="parent">
122
+
123
+ <div class="child">
124
+
125
+ CHILD
126
+
127
+ </div>
128
+
129
+ </div>
130
+
131
+ </div>
132
+
133
+ </div>
134
+
135
+ <div class="footer">
136
+
137
+ Footer
138
+
139
+ </div>
140
+
141
+ </div>
142
+
143
+ ```
144
+
145
+ ```CSS
146
+
147
+ .main-container {
148
+
149
+ background-color: black;
150
+
151
+ display:flex;
152
+
153
+ flex-direction: column;
154
+
155
+ align-content: space-between;
156
+
157
+ }
158
+
159
+ .header {
160
+
161
+ background-color: red;
162
+
163
+ flex: 0 0 50px;
164
+
165
+ height: 50px;
166
+
167
+ }
168
+
169
+ .content {
170
+
171
+ background-color: blue;
172
+
173
+ flex: 1 1 0;
174
+
175
+ /*
176
+
177
+ display: flex;
178
+
179
+ display: -webkit-flex;
180
+
181
+ flex-direction: column;
182
+
183
+ -webkit-flex-direction: column;
184
+
185
+ */
186
+
187
+ }
188
+
189
+ .wrap {
190
+
191
+ height: 100%;
192
+
193
+ }
194
+
195
+ .parent {
196
+
197
+ align-items: center;
198
+
199
+ background-color: yellow;
200
+
201
+ display: flex;
202
+
203
+ flex-direction: row;
204
+
205
+ height: 100%;
206
+
207
+ justify-content: center;
208
+
209
+ }
210
+
211
+ .child {
212
+
213
+ background-color: pink;
214
+
215
+ flex: 0 0 150px;
216
+
217
+ height: 150px;
218
+
219
+ }
220
+
221
+ .footer {
222
+
223
+ background-color: green;
224
+
225
+ flex: 0 0 100px;
226
+
227
+ height: 100px;
228
+
229
+ }
230
+
93
- ```**動くサンプル:**[https://jsfiddle.net/](https://jsfiddle.net/)
231
+ ```**動くサンプル:**[https://jsfiddle.net/61rLuvq5/](https://jsfiddle.net/61rLuvq5/)
232
+
233
+
234
+
235
+ 【CSS3 Flexbox の各プロパティの使い方をヴィジュアルで詳しく解説 | コリス】
236
+
237
+ [http://coliss.com/articles/build-websites/operation/css/css3-flexbox-properties-by-scotch.html](http://coliss.com/articles/build-websites/operation/css/css3-flexbox-properties-by-scotch.html)
238
+
239
+
240
+
241
+ 【CSS3のFlexboxを基本から理解して、使い倒そう! | 株式会社LIG】
242
+
243
+ [http://liginc.co.jp/web/html-css/css/21024](http://liginc.co.jp/web/html-css/css/21024)