使用z-index:-1 让一个层在所有层的下面当背景
摘要:让一个层在所有层的下面当背景的方法:z-index:-1要让z-index的值小于0img{position:absolute;left:0...
让一个层在所有层的下面当背景的方法:z-index:-1
要让z-index的值小于0
<html>
<head>
<style type="text/css">
img
{
position:absolute;
left:0px;
top:0px;
z-index:-1;
}
</style>
</head>
<body>
<h1>This is a heading</h1>
<img src="http://www.jb51.neti/eg_smile.gif" />
<p>由于图像的 z-index 是 -1,因此它在文本的后面出现。</p>
</body>
</html>
【使用z-index:-1 让一个层在所有层的下面当背景】相关文章:
★ CSS样式:background-position的理解
上一篇:
css实现数字分页效果