想让背景图片拉伸显示,但是不知道是什么原因,用background-size:cover;如果页面内容不能充满整个页面,这个属性不起作用(用的chrome,IE10),有碰到这种问题的吗?

    于是又想了别的办法解决:

    背景图片充满页面并固定,页面滚动,背景固定

body{
  background-repeat:no-repeat ;
  background-size:100% 100%;
  background-attachment: fixed;
}

 

相关文章:

  • 2021-12-13
  • 2022-12-23
  • 2021-12-05
  • 2021-08-13
  • 2021-12-19
  • 2021-12-29
  • 2022-12-23
  • 2021-11-30
猜你喜欢
  • 2021-12-05
  • 2022-12-23
  • 2021-07-16
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2021-11-04
相关资源
相似解决方案