【发布时间】:2017-10-13 21:02:44
【问题描述】:
好的,我的问题是,我在图像背景之上有一个半透明的背景颜色。但是当电脑屏幕变大并且页面垂直变长然后水平变长时,背景颜色会在内容结束后停止。
示例:background-color end before the end of the page.
我到处寻找并尝试了所有方法(高度:100%;高度:100vh;底部:0;边距:0;等等)。 100% 什么都不做,当使用 100vh 时,当我向下滚动时,背景颜色会停止,底部/边距:0;什么都没有。
我使用的代码是这样的。
html {
background: url(../images/back1.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
body {
background-color: rgba(0, 34, 62, 0.7);
margin: -0.5px;
font-family: verdana, sans-serif;
color: #b9c8d4;
text-align: center;
}
要查看网站和整个代码,请访问:http://bienivitesse.com/juluwarlu/
如果有人知道解决此问题的任何方法,请告诉我。
【问题讨论】:
标签: html css layout background-color