flex弹性布局

174 阅读1分钟

1、flex-direction row(默认) row-reverse column column-reverse 排列的方式横排、竖排,加了reverse就是可以理解为从右边拍起,从下方排起(reverse的意思是翻转) 2、flex-wrap no-wrap wrap wrap-reverse 3、flex-flow(相当于flex-direction和flex-wrap的简写) 4、justify-content(对齐方式:左对齐右对齐居中对齐) (记忆:横排竖排不换行,对齐方式是justify-content)

项目的属性 1、flex(占比大小) 2、order(顺序)