0
我试图添加具有模糊效果的背景要素(这里看到)背景元素越过正文元素
.background-image {
position:absolute;
left:0;
right:0;
top:0;
bottom:0;
background-image: url('bg.jpg');
background-size: cover;
display: block;
filter: blur(5px);
-webkit-filter: blur(5px);
height: 800px;
left: 0;
position: fixed;
right: 0;
z-index: 100;
}
然而,当我把它放在我的HTML:
<body>
<main>
<div>
<div class="background-image"></div>
<div class="homestrip">
<!-- rest of stuff goes here -->
背景重叠一切。我看不到我的身体元素,无论我移动背景图像元素的位置,我的其他东西都不可见。