©
This document uses PHP Chinese website manual Release
box-lines:single | multiple
默认值:single
适用于:伸缩盒容器
继承性:无
动画性:否
计算值:指定值
single:伸缩盒对象的子元素只在一行内显示
multiple:伸缩盒对象的子元素超出父元素的空间时换行显示
效果类似于过渡版本和新版本的flex-wrap属性;
对应的脚本特性为boxLines。
<!DOCTYPE html> <html lang="zh-cmn-Hans"> <head> <meta charset="utf-8" /> <title>box-lines_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-box;display:-moz-box;display:-ms-box;background:#000;width:240px;height:100px;margin:0;padding:10px;list-style:none;vertical-align:top;} .box li{width:160px;} .box li:nth-child(1){background:#666;} .box li:nth-child(2){background:#999;} .box li:nth-child(3){background:#ccc;} #box{-webkit-box-lines:single;-moz-box-lines:single;-ms-box-lines:single;} #box2{-webkit-box-lines:multiple;-moz-box-lines:multiple;-ms-box-lines:multiple;} </style> </head> <body> <h1>box-lines:single;</h1> <ul id="box" class="box"> <li>a</li> <li>b</li> <li>c</li> </ul> <h1>box-lines:multiple;</h1> <ul id="box2" class="box"> <li>a</li> <li>b</li> <li>c</li> </ul> </body> </html>
点击 "运行实例" 按钮查看在线实例