码迷,mamicode.com
首页 > Web开发 > 详细

css flex相关,长期更新

时间:2016-07-05 06:21:27      阅读:303      评论:0      收藏:0      [点我收藏+]

标签:

这里暂时不是入门教学,是flex知识收集

兼容性
display: flex;
display: -webkit-flex;

其余新属性前面加-webkit-
  

Flex属性(the first value is the default one of the property)
  direction:ltr/rtl //the flex line

  flex-direction:flex-start/flex-end/center/space-between/space-around //the main axis

  align-items:flex-start/flex-end/center/baseline/stretch //the cross axis

  flex-wrap:nowrap/wrap/wrap-reverse

  align-content:stretch/flex-start/flex-end/center/space-between/space-around

  flex-flow: [flex-direction] [flex-wrap]

Flex Item属性
  order:0

  margin:auto

  align-self:stretch/flex-start/flex-end/center/baseline //overrides Flex Container‘s align-items

  flex: 0 1 auto/[Number]/initial/auto/none //不要用,除非把flex-basis部分设置auto,否则在ie里,box-sizing强制变content box
  flex: [flex-grow] [flex-shrink] [flex-basis]

  flex-basis:auto/[width]

  flex-grow:0

  flex-shrink:1

css flex相关,长期更新

标签:

原文地址:http://www.cnblogs.com/sunshine-life/p/5642190.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!