我在这里为我的网站使用固定背景封面: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;
}
}
关于html - 固定背景封面在移动 View 中放大,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23838718/