1
當我在移動設備上向下滾動時,我無法將背景圖像設置爲屏幕居中位置。無法將背景元素設置爲固定位置
目前,我在我的桌面上滾動時的網站背景與我想要的一樣。問題出在移動設備上,由於某些原因,當使用開發工具查看移動解決方案的網站時,它的效果很好,但實際操作時卻無法正常工作。
任何人都可以請幫我解決這個問題嗎?
我當前的代碼是:
body.custom-background, #custom-background-css {
background-position: center center !important;
min-height: 100%;
background-repeat:no-repeat;
background-attachment: fixed;
}
我的網站是:test.ebdesigns.us (WordPress的平臺)
此外,當收視源代碼的東西是生產這個,不知道。這可能會影響它。
<style type="text/css" id="custom-background-css">
body.custom-background { background-image: url('http://www.test.ebdesigns.us/wp-content/uploads/2015/07/NewColumbis51Logorev101.jpg'); background-repeat: no-repeat; background-position: top center; background-attachment: fixed; }
</style>
不,它只是將圖像移動到我的移動設備頂部,只是試了一下。 – LouiIsMyDog
另外,你的意思是「其實一些插件發送這個」body.custom-background「你的CSS,但這不是這種情況」?我有一個插件干擾? – LouiIsMyDog
編輯::增加身體的高度。 (height:100vh) – joyBlanks