box-direction

收藏:0   阅读:53

CSS3 box-direction 属性


实例

由右至左,显示一个div box的子元素:

div
{
width:350px;
height:100px;
border:1px solid black;

/* Internet Explorer 10 */
display:-ms-flexbox;
-ms-flex-direction:row-reverse;

/* Firefox */
display:-moz-box;
-moz-box-direction:reverse;

/* Safari, Opera, and Chrome */
display:-webkit-box;
-webkit-box-direction:reverse;

/* W3C */
display:box;
box-direction:reverse;
}


浏览器支持

Internet ExplorerFirefoxOperaGoogle ChromeSafari

目前主流浏览器不支持 box-direction 属性。

Internet Explorer 10通过私有属性 the -ms-flex-direction 支持.

Firefox通过私有属性- MOZ-box-direction支持。

Safari和Chrome通过私有属性-WebKit-box-direction属性。

注意: Internet Explorer 9及更早IE版本不支持弹性框.


属性定义及使用说明

box-direction属性指定显示哪个方向的box的子元素。

默认值: normal
继承性: no
版本: CSS3
JavaScript 语法: object.style.boxDirection="reverse"


语法

box-direction: normal|reverse|inherit;

描述
normal 以默认方向显示子元素。
reverse 以反方向显示子元素。
inherit 应该从子元素继承 box-direction 属性的值
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!