Home > Web Front-end > HTML Tutorial > ios移动端部分手机不支持background-attachment: fixed 的解决办法_html/css_WEB-ITnose

ios移动端部分手机不支持background-attachment: fixed 的解决办法_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:27:43
Original
1675 people have browsed it

ios系统和某些移动端background-attachment:fixed不兼容性,没有任何效果,但可以hack一下就可以了,代码如下:

ps:想在哪个标签加背景,可以在它class后:before.

body:before {  content: ' ';  position: fixed;  z-index: -1;  top: 0;  right: 0;  bottom: 0;  left: 0;  background: url(path/to/image) center 0 no-repeat;  background-size: cover;}
Copy after login

内容来自:前端录»ios_iphone_移动端background-attachment:fixed兼容性[失效]

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template