我在这里为我的网站使用固定背景封面:http://www.datisdesign.com http://www.datisdesign.com
每个页面都有一个很大的标题图像,但在手机等小型设备中,封面图像变得很大。我想让它在移动设备上变得更小。
这是我正在使用的代码:
#takelessons {
background: url(../img/portfolio/takelessons-intro.jpg) no-repeat;
background-attachment: fixed;
background-size: cover;
background-position: center top;
}
我通过限制大平板电脑屏幕尺寸的功能解决了我的问题。
@media screen and (max-width: 992px) {
#parallax {
background-attachment: scroll;
}
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)