【发布时间】:2016-06-04 19:31:11
【问题描述】:
我的背景有以下代码,因此图像有点不透明。
div#home {
background-size: cover;
color: #404040;
background-image: linear-gradient(to bottom, rgba(0,0,0, 0.45) 0%,rgba(0,0,0, 0.45) 100%), url(/images/sp-bg.jpg);
}
但是我希望它被修复。我尝试使用 background-attachment 但这在 iOS Safari 上不起作用,所以我正在寻找替代方案并遇到:
background: url(/img.png) no-repeat center center fixed
我正在尝试实现它,因此它适用于我的不透明度有点像:
div#home {
background-size: cover;
color: #404040;
background: linear-gradient(to bottom, rgba(0,0,0, 0.45) 0%,rgba(0,0,0, 0.45) 100%), url(/images/sp-bg.jpg) no-repeat center center fixed;
}
但是,这使我的图像放大了很多。
该网站的访问地址为:http://www.shivampaw.com/
谢谢
【问题讨论】:
标签: html ios css background background-image