1
的網址不加載:4genderjustice.org背景圖片在Firefox
這適用於所有的瀏覽器罰款(據我可以告訴),除了Firefox瀏覽器。問題是:爲什麼它不適用於Firefox?
的背景圖像設置是這樣的:
#top .homepage-cover-photo{
position: relative;
}
#top .homepage-cover-photo .x-container {
position: absolute;
clip: none;
clip-path: none;
top: 0;
right: 0;
bottom: 0;
left: 0;
height: 100%;
width: 100%;
}
#top .homepage-cover-photo .x-column.x-1-1 .bgimg {
position: absolute;
background-attachment: fixed;
background-position: top center;
background-size: cover;
background-repeat: no-repeat;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -3;
}
這應該呈現在大多數現代瀏覽器的罰款。
(實際背景圖像中的各個元素.bgimg設定。)
然而,因爲Chrome瀏覽器/ WebKit的/閃爍(不是100%肯定,我認爲這是眨眼,但它也發生在WebKit的瀏覽器)不渲染這些吧,我把修復描述here:
.Chrome #top .homepage-cover-photo .x-container,
.Opera #top .homepage-cover-photo .x-container,
.iPhone #top .homepage-cover-photo .x-container,
.iPad #top .homepage-cover-photo .x-container,
.Safari #top .homepage-cover-photo .x-container {
clip: rect(auto,auto,auto,auto);
clip-path: rect(auto,auto,auto,auto);
-webkit-mask-image: -webkit-linear-gradient(top, #ffffff 0%,#ffffff 100%);
}
.Chrome #top .homepage-cover-photo .x-column.x-1-1 .bgimg,
.Opera #top .homepage-cover-photo .x-column.x-1-1 .bgimg,
.iPhone #top .homepage-cover-photo .x-column.x-1-1 .bgimg,
.iPad #top .homepage-cover-photo .x-column.x-1-1 .bgimg,
.Safari #top .homepage-cover-photo .x-column.x-1-1 .bgimg {
position: fixed;
background-attachment: scroll;
-webkit-transform-style: preserve-3d;
}
這是通過瀏覽器進行嗅探(抱歉,但它是我能想出的作品)的唯一解決方案。
非常感謝! – Flobin