当前位置: 首页 > 网络学院 > 网页制作基础教程 > CSS > CSS z-index属性

CSS
CSS 介绍
CSS 语法
使用 CSS
CSS 背景
CSS 文字
CSS 字体
CSS 边框
CSS 边距
CSS 填充
CSS 列表
CSS 尺寸
CSS 类别
CSS 定位
CSS 伪类
CSS 伪元素
CSS2 Media类型
CSS 摘要
CSS 实例
CSS2 参考资料
CSS2 打印

CSS z-index属性


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 336 ::
收藏到网摘: n/a

The z-index property sets the stack order of an element. An element with greater stack order is always in front of another element with lower stack order.
z-index属性可以设置元素的堆放次序。有着较大的值的元素会堆叠在较小值元素的上面。

Note: Elements can have negative stack orders.
注意:元素可以使用负数的堆叠次序

Note: Z-index only works on elements that have been positioned (eg position:absolute;)!
注意:Z-index只可以在被定位的元素上使用(比如 position:absolute)

Inherited: No
继承性:无

举例

img

z-index: -1
}  

可用值

描述
auto The stack order is equal to its parents
堆叠次序值等于它的父级堆叠次序值
number Sets the stack order of the element
设置元素的堆叠次序值

评论 (0) All

登陆 | 还没注册?