【发布时间】:2015-03-14 23:40:58
【问题描述】:
我的网站显示了一个大的背景图像层,上面覆盖着一个半透明的绿色层。问题出现在较低的分辨率下,即绿色图层的宽度似乎比背景图像更薄,从而暴露了浏览器窗口右侧的一些背景图像。
Here is a link to my demo site
我还不能插入图片,但是here is a link 可以插入显示我正在谈论的内容的屏幕截图。
绿色层的css:
#mainarea {
height: 960px;
width:100%;
background:rgba(46, 204, 113, 0.7);
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
font-family: "Roboto";
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
背景图片的css:
.bg{
background:url(https://ununsplash.imgix.net/photo-1415871989540-61fe9268d3c8?q=75&fm=jpg&s=d4ccd3c8661437d6e3ea5e88c63c647f) no-repeat top left;
background-size:cover;
width:100%;
height:900px;
position:fixed;
z-index:-1;
}
感谢您的宝贵时间。
【问题讨论】:
标签: html css responsive-design overlay layer