![](/img/trans.png)
[英]preserveAspectRatio of pattern image in SVG like css background-image cover
[英]CSS background-image / cover issues
我希望有人能夠幫助我解決一個開始使我有點發瘋的問題...
我正在一個新的網頁上工作-www.romaheritage.co.uk/beta-我在“聯系”部分頁面底部附近的背景圖像有問題。 用兩種不同的瀏覽器測試該頁面,該道路圖像出現在Firefox中,但沒有出現在Google Chrome中,我也不知道為什么!
更令人沮喪的是,我在頁面頂部設置了背景圖片,這在兩種瀏覽器中都可以正常使用!
我正在使用的CSS是這樣(盡管可以隨時檢查網站本身);
background-image: url(../img/contact.jpg);
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
任何人都能給我的幫助將不勝感激,因為有點像《黑客帝國》中的Neo,我現在只是看到幾行代碼,但是卻迷失了……
問題在於background-attachment: fixed;
刪除它只使圖像出現。 或添加backface-visibility: hidden;
,以.contact-parallax-bg
恢復固定效果。
.contact-us-section{
position: relative;
}
刪除相對位置,您將獲得“視差”效果,並且圖像在那里
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.