我(simplifed)HTML和CSS是這樣的:圖像沒有填滿整個頁面
@keyframes animatedBackground {
from {
background-position: 0 0;
}
to {
background-position: 100% 0;
}
}
*{margin:0;padding:0;}/*added as requested*/
.background-image {
background-image: url("http://wallpapercave.com/wp/UoQbFHi.jpg");
background-position: 0px 0px;
left: 0;
bottom:0; /*added as requested*/
right:0;
top:0; /*added as requested*/
position: fixed;
z-index: 1;
animation: animatedBackground 10s linear infinite;
background-size: cover;
height: 160%;
-webkit-filter: blur(5px);
filter: blur(5px);
}
<div class="background-image"></div>
Aparently
不在這裏工作了? 不管怎樣,我的問題是,我使用的瀏覽器,這給在上面一個奇怪的間距(出於某種原因)
嘗試體{保證金:0} – sinisake
你有刪除的默認保證金和身體和HTML的填充? –
試一下''{margin:0; padding:0;}'或'body {margin:0; padding:0;}' –