图像并非完全固定在当前页面上,如何使背景图像完美贴合页面
.background-image {
background-image: url('camera.jpg');
background-size: cover;
display: block;
height: 800px;
left: -5px;
top:-5px;
bottom:-5px;
right: -5px;
position: fixed;
z-index: 1;
margin:0px auto;
-webkit-filter: blur(5px);
-moz-filter: blur(5px);
-o-filter: blur(5px);
-ms-filter: blur(5px);
filter: blur(5px);
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
}
我尝试了这个,但没有与模糊一起工作
background: url(images/bg.jpg) no-repeat center center fixed;
答案 0 :(得分:1)