Flex是Flexible Box的缩写,意味"弹性布局",任何一个容器均可以指定为Flex布局前端
flex-direction:row (主轴水平方向,起点在左端)
flex-direction:row-reverse (主轴水平方向,起点在右端)
flex-direction:column (主轴垂直方向,起点在上沿)
flex-direction:column-reverse (主轴在垂直方向,起点在下沿)
flex-wrap:nowarp (不换行,默认的)
flex-wrap:wrap (换行,第一行在上面)
flex-wrap:wrap-reverse (换行,第一行在下面)
justify-content:flex-start (左对齐,默认值)
justify-content:flex-end(右对齐)
justify-content:center (居中)
justify-content:space-between (两端对齐,项目之间的间隔相等)
justify-content:space-around (每一个项目两侧的间距相等)
align-items:flex-start (交叉轴起点对齐)
align-items: flex-end (交叉轴终点对齐)
align-items:center (垂直方向,中间开始)
align-items:baseline (项目第一行文字的基线对齐)
align-items:stretch (默认值,若是项目未设置高度或设为auto,将占满整个容器的高度)
order:number (数值越小越靠前,默认为0)
flex-grow :number(默认0,若是有剩余空间也不放大,值为1放大,2是1的双倍大小,此类推)
flex-shrink :number (默认为1,若是空间不足则会缩小,值为0不能缩小)
flex-basis :number/auto (默认auto,可设置固定的值50px/50%)
align-self :auto | flex-start | flex-end | center | baseline | stretch
若是以为本文还不错,记得点个赞哦!markdown
欢迎你们加入,一块儿学习前端,共同进步!布局