是否可以在整个网页上叠加重复图像?如果是这样,怎么样?
答案 0 :(得分:5)
这样的事情:
HTML
<div class="overlay"></div>
CSS
.overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: url("image.png") repeat;
}
你可能想把div放在html的最后,以确保它高于页面上的其他内容,或者你可以使用z-indexing。
答案 1 :(得分:1)
您无法点击页面上的任何元素,因为您使用<div>
覆盖了整个页面,因此所有元素都隐藏在<div>
后面。
但是,您可以应用色调&#39;以这种方式到你的身体背景 -
.body{background-image: url("overlay image"), url("your bg image");}
确保您的叠加图像具有适当的透明度。