©
This document uses PHP Chinese website manual Release
flex-flow:<' flex-direction '> || <' flex-wrap '>
默认值:看各分拆属性
适用于:flex容器
继承性:无
动画性:否
计算值:指定值
<' flex-direction '>:定义弹性盒子元素的排列方向。
<' flex-wrap '>:控制flex容器是单行或者多行。
对应的脚本特性为flexFlow。
Values | IE | Firefox | Chrome | Safari | Opera | iOS Safari | Android Browser | Android Chrome |
---|---|---|---|---|---|---|---|---|
Basic Support | 6.0-10.0 | 2.0-27.0 | 4.0-20.0 | 6.0 | 15.0+-webkit- | 6.0-6.1 | 2.1-4.3 | 18.0-19.0 |
11.0 | 28.0+ | 21.0+-webkit- | 6.1+-webkit- | 17.0+ | 7.0+-webkit- | 4.4+ | 20.0+-webkit- | |
29.0+ | 9.0+ | 9.0+ | 28.0+ |
<!DOCTYPE html> <html lang="zh-cmn-Hans"> <head> <meta charset="utf-8" /> <title>flex-flow_CSS参考手册_web前端开发参考手册系列</title> <meta name="author" content="Joy Du(飘零雾雨), dooyoe@gmail.com, www.doyoe.com" /> <style> h1{font:bold 20px/1.5 georgia,simsun,sans-serif;} .box{ display:-webkit-flex; display:flex; width:220px;margin:0;padding:10px;list-style:none;background-color:#eee;} .box li{width:100px;height:100px;border:1px solid #aaa;text-align:center;} #box{ -webkit-flex-flow:row nowrap; flex-flow:row nowrap; } #box2{ -webkit-flex-flow:row wrap-reverse; flex-flow:row wrap-reverse; } #box3{ height:220px; -webkit-flex-flow:column wrap-reverse; flex-flow:column wrap-reverse; } </style> </head> <body> <h1>flex-flow示例:</h1> <h2>flex-flow:row nowrap</h2> <ul id="box" class="box"> <li>a</li> <li>b</li> <li>c</li> </ul> <h2>flex-flow:row wrap-reverse</h2> <ul id="box2" class="box"> <li>a</li> <li>b</li> <li>c</li> </ul> <h2>flex-flow:column wrap-reverse;</h2> <ul id="box3" class="box"> <li>a</li> <li>b</li> <li>c</li> </ul> </body> </html>
点击 "运行实例" 按钮查看在线实例