http://www.runoob.com/w3cnote/flex-grammar.html
flex弹性盒子——display:flex
1 flex-direction:row,这时,设置的width失效
flex-direction:column ,这时,设置的height失效
2 flex :用来设置比例
flex-wrap 和flex:1 不能一起用
因为flex:1规定了元素宽度的比例是适合的,换行就失效了
3 older用于设置flex的顺序
4 默认显示 align-items:flex-start 的效果(如图1),要想显示其他效果,需要再设置覆盖它(如图2)


<align-self>属性允许单个项目有与其他项目不一样的对齐方式,可覆盖align-items属性。默认值为auto,表示继承父元素的align-items属性,如果没有父元素,则等同于stretch。

网友评论