首页 > Web开发 > 详细

使用z-index:-1 让一个层在所有层的下面当背景

时间:2015-11-27 21:29:04      阅读:269      评论:0      收藏: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="/i/eg_smile.gif" />
<p>由于图像的 z-index 是 -1,因此它在文本的后面出现。</p>
</body>
</html>

使用z-index:-1 让一个层在所有层的下面当背景

原文:http://www.jb51.net/css/160763.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!