首页 > 其他 > 详细

background-attachment:fixed不兼容性

时间:2018-02-12 15:57:39      阅读:266      评论: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;
}

background-attachment:fixed不兼容性

原文:https://www.cnblogs.com/xuniannian/p/8444526.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!