使用background-attachment(fixed固定背景图以及ios系统不兼容网页背景图片固定的解决方案)
解决办法:
body{
width: 100%;
background-image:url('url);
【使用background-attachment(fixed固定背景图以及ios系统不兼容网页背景图片固定的解决方案)】background-repeat: no-repeat;
background-position: center;
background-attachment: fixed;
z-index: -1;
}
兼容性:
body:before {
content: ’ ';
position: fixed;
z-index: -1;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: url('url) center 0 no-repeat;
background-size: cover;
}
推荐阅读
- 由浅入深理解AOP
- 【译】20个更有效地使用谷歌搜索的技巧
- mybatisplus如何在xml的连表查询中使用queryWrapper
- MybatisPlus|MybatisPlus LambdaQueryWrapper使用int默认值的坑及解决
- MybatisPlus使用queryWrapper如何实现复杂查询
- iOS中的Block
- Linux下面如何查看tomcat已经使用多少线程
- 使用composer自动加载类文件
- android|android studio中ndk的使用
- 使用协程爬取网页,计算网页数据大小