Html 背景图像不在内容div下
我想把背景图像放在正下方。右div,但它将自身定位在正上方。右div。如何解决这个问题 这是笔:Html 背景图像不在内容div下,html,css,background,Html,Css,Background,我想把背景图像放在正下方。右div,但它将自身定位在正上方。右div。如何解决这个问题 这是笔: 背景图像url后缺少分号: .background-image { background-image: url("http://www.worldswallpapers.org/wp-content/uploads/2014/02/Nature-Wallpapers-2014-2.jpg"); [other rules...] } 这不仅仅是缺少的分号 我认为这是理想的结果: HTML部分:
背景图像url后缺少分号:
.background-image {
background-image: url("http://www.worldswallpapers.org/wp-content/uploads/2014/02/Nature-Wallpapers-2014-2.jpg");
[other rules...]
}
这不仅仅是缺少的分号 我认为这是理想的结果: HTML部分:
结束这是工作笔:缺少分号:背景图像:urlhttp://www.worldswallpapers.org/wp-content/uploads/2014/02/Nature-Wallpapers-2014-2.jpg @Shomz我喜欢这些小但关键语法的问题。通常是晚上疲劳的时候D不过谢谢。每个人都会这样:
.background-image {
background-image: url("http://www.worldswallpapers.org/wp-content/uploads/2014/02/Nature-Wallpapers-2014-2.jpg");
[other rules...]
}
<div class="wrap">
<div class="background-image"></div>
<div class="right"></div>
</div>
.wrap { position: relative; }
.background-image {
background-image: url("http://www.worldswallpapers.org/wp-content/uploads/2014/02/Nature-Wallpapers-2014-2.jpg");
background-size: cover;
filter: blur(5px);
-webkit-filter: blur(5px);
height: auto;
min-height: 100%;
min-width: 100%;
position: absolute;
left: 0;
right: 0;
}
.right {
box-sizing: border-box;
position: relative;
padding: 50px 20px;
width: 100%;
min-height: 400px;
max-height: auto;
margin-bottom: 5px;
background: rgba(255, 255, 255, 0.3);
}