You have quite a few things not quite right here. First, you're mixing old properties with new properties (display: -webkit-box
is from the 2009 draft, but -webkit-flex-flow
is from the standard draft).
Second, none of the 2009 Flexbox implementations support box-lines: multiple
, which is required for enabling wrapping. Sadly, nearly all mobile devices support only the 2009 draft. Firefox versions that support the modern specification currently do not support wrapping either (flex-flow and flex-wrap are supported properties, but the values pertaining to wrapping are not supported).
Third, you've got justify-content: space-around
, but its 2009 counterpart is set to box-pack: center
. Center is center in all drafts.
http://cssdeck.com/labs/ccamtvl5
.flex-container {
display: -ms-flexbox;
display: -webkit-flex;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-ms-flex-line-pack: end;
-webkit-align-content: flex-end;
align-content: flex-end;
-ms-flex-pack: distribute;
-webkit-justify-content: space-around;
justify-content: space-around;
height: 100%;
}
@supports (flex-wrap: wrap) { /* hide from incomplete Firefox versions */
.flex-container {
display: flex;
}
}
Update: Wrapping now works in Firefox as of version 28, but only when using the modern properties (not the old prefixed ones like display: -moz-box
).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…