老属性

1
2
3
4
display: box;
display: -webkit-box;
-webkit-box-align: center(...);
-webkit-box-pack: center(...);

新属性

Flex 布局教程:语法篇

1
2
3
4
5
6
7
//父元素
display: flex;
flex-flow: row/column/nowrap/wrap // 简写flex-direction & flex-wrap
justify-content: flex-start/flex-end/center/space-between/space-around
align-items: flex-start/flex-end/center/stretch(不写高度或auto自动拉伸)/baseline
//子元素
flex: 1;

2015-09-08

⬆︎TOP