我一直在使用該代碼在我的身上,讓一個完整的背景,一些MI-透明白色背景上它之後的限制:透明背景與身體::通過屏幕尺寸
body {
background: url('../images/bg.jpg') no-repeat center center fixed;
padding-top: 50px;
}
body::after {
content: "";
background: white;
opacity: 0.5;
top: 0;
left: 0;
bottom: 0;
right: 0;
position: absolute;
z-index: -1;
}
問題是白色背景不會低於屏幕尺寸as you can see here。任何想法如何解決這個問題?
請發表您完成的代碼,而不是圖像。 – Alex
,只取決於身體的大小。你想要背景多久?內容更長但仍爲空?順便說一句,有人拼寫「汗」錯 – coozin
你試過'位置:固定'而不是'絕對'? – Quantastical