我一直在使用该代码在我的身上,让一个完整的背景,一些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