z-index

z-index 属性指定一个元素的堆叠顺序。

拥有更高堆叠顺序的元素总是会处于堆叠顺序较低的元素的前面。

一般写法.zIndex="1"

<h1>This is a heading</h1>
<img src="w3css.gif" width="100" height="140" />
<p>因为图像元素设置了 z-index 属性值为 -1, 所以它会显示在文字之后。</p>

img
{
position:absolute;
left:0px;
top:0px;
z-index:-1;
}

posted @ 2016-03-27 22:24  脸大陈小姐  阅读(91)  评论(0编辑  收藏  举报