的問題是,你申請的模糊到整個div.background
這將適用於所有的孩子,你能做的最好的只是移動.hidden-scrollbar
外背景的這樣
<div class="background"></div>
<div class="hidden-scrollbar">....</div>
然後加入旁邊的背景
position: absolute;
top: 0;
left: 0;
right: 0;
UPDATE
或者你也可以只添加在:before
僞類
.background:before {
content:"";
-webkit-filter: blur(15px);
-moz-filter: blur(15px);
-o-filter: blur(15px);
-ms-filter: blur(15px);
filter: blur(15px);
background: url(../img/newback.jpg) repeat-y;
-webkit-animation: backgroundScroll 120s linear infinite;
animation: backgroundScroll 120s linear infinite;
width: 100vw;
height: 100vh;
position: fixed;
}
.background {
width: 100vw;
height: 100vh;
top: -5%;
left: -5%;
z-index: 0;
}
背景和動畫等一下,你要求我們***安裝**(從回購克隆)*網站才能看到它?您是否意識到網站是爲了向訪問者呈現內容的概念而發明和形成的,而無需除瀏覽之外的任何其他內容?或者你跳過了這一課?我建議你創建一個你正在描述的問題的[mcve]。有關提問的問題,請參見[問]的建議。 –
哦,不,不。我在Github上有了這個頁面,所以我認爲這是一個很好很簡單的方式讓我向你展示代碼。 –