码迷,mamicode.com
首页 > 移动开发 > 详细

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

时间:2016-02-01 14:36:30      阅读:238      评论:0      收藏:0      [点我收藏+]

标签:

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;
}

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

原文链接:http://www.wozhuye.com/index.php?m=content&c=index&a=show&catid=3&id=318

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

标签:

原文地址:http://www.cnblogs.com/banmengbanxing/p/5174694.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!