您好我是css的新手,需要一些帮助。我想在我的网站上为CSS创建3层,所以它看起来像我在下面提供的图片。
我如何在CSS中设置它?任何帮助将不胜感激。
三江源。
答案 0 :(得分:2)
您想了解z-index属性。但基本上,您申请z-index
的任何内容都需要设置position
...我非常确定static
不起作用absolute
{ {1}}& relative
都做到了。然后你可以订购它们。例如:
fixed
有意义吗?
答案 1 :(得分:0)
您所要做的就是将模式的背景图像添加到css中 这是代码的一个例子
div {
background: url(../images/purpalt.png) repeat;
}
[http://www.bootply.com/4iBwk4Tmfr][1]
/* CSS used here will be applied after bootstrap.css */
/* Custom container */
.container-full {
margin: 0 auto;
width: 100%;
background: #666;
}
.jumbotron {
background: black;
height: 553px;
}
.container {
background: #ccc;
padding: 15px 10px;
height: 553px;
width: 960px;
}
.image-box {
background: #fff;
text-align: center;
height: 500px;
}
footer {
background: orange;
height: 190px;
<div class="container-full">
<div class="jumbotron">
</div>
<div class="container">
<div class="col-md-12">
<div class="image-box">
Image to go here
</div>
</div>
</div>
</div> <!-- /container full -->
<footer></footer>