小白教程
所有教程
关于
Search
172.69.7.166
172.69.7.166
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Css3 pr box orient”的源代码
本页内容
上一节:
Css3_pr_box_ordinal_group
下一节:
Css3_pr_box_pack
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE:box-orient}}[[Category:css reference|119]] = CSS3 box-orient 属性 = 指定div元素的子元素横向排列: <sample title="" desc="" lang="html" hererun="1"> div { width:350px; height:100px; border:1px solid black; /* Firefox */ display:-moz-box; -moz-box-orient:horizontal; /* Safari, Opera, and Chrome */ display:-webkit-box; -webkit-box-orient:horizontal; /* W3C */ display:box; box-orient:horizontal; } </sample> <run name=""> <!DOCTYPE html> <html> <head> <style> div { width:350px; height:100px; border:1px solid black; /* Firefox */ display:-moz-box; -moz-box-orient:horizontal; /* Safari, Opera, and Chrome */ display:-webkit-box; -webkit-box-orient:horizontal; /* W3C */ display:box; box-orient:horizontal; } </style> </head> <body> <div> <p>Cat</p> <p>Dog</p> <p>Horse</p> </div> <p><b>Note:</b> The box-orient property is not supported in IE.</p> </body> </html> </run> == 浏览器支持 == 目前所有主流浏览器都不支持box-orient属性。 Firefox通过私有属性- MOZ-box-orient支持。 Safari, Opera, 和 Chrome通过私有属性 -webkit-box-orient 支持. == 属性定义及使用说明 == box-orient 属性指定一个box子元素是否应按水平或垂直排列。 '''Tip:''' 水平方向的box里的子元素是由左到右显示,垂直方向的box显示从上到下排列。然而,[[css3 pr box direction|box-direction]]方向可由 [[css3 pr box direction|box-ordinal-group]]属性改变这个顺序。 {| class="table table-striped table-hover" | 默认值: | inline-axis |- | 继承: | no |- | 版本: | CSS3 |- | JavaScript 语法: | object.style.boxOrient="vertical" |} == 语法 == box-orient: horizontal|vertical|inline-axis|block-axis|inherit; {| class="table table-striped table-hover" ! 值 ! 说明 |- | horizontal | 指定子元素在一个水平线上从左至右排列 |- | vertical | 从顶部向底部垂直布置子元素 |- | inline-axis | 子元素沿着内联坐标轴(映射到横向) |- | block-axis | 子元素沿着块坐标轴(映射到垂直) |- | inherit | box-orient 属性的值应该从父元素继承 |}
返回至“
Css3 pr box orient
”。
上一节:
Css3_pr_box_ordinal_group
下一节:
Css3_pr_box_pack