http://www.samson-book.com

该网站的页面正文上通过CSS设置了背景图片。它会显示在每个台式机浏览器和android上,但不会显示在iOS的移动浏览器中。我不知道为什么。

CSS:

@media only screen and (max-width: 480px) {
  body {
  background-image: url("img/bg_small.jpg");
  background-repeat: no-repeat;
  background-color: #000;
  }
  #coverbox {
    width: 80%;
    margin-left: 20px;
  }
}

最佳答案

不确定,但您是否尝试过单行显示,例如:

background: url('img/bg_small.jpg') no-repeat top center #000;

顶部中心只是对齐,因此它将粘在设备顶部并自动将其居中。希望它能帮助我正常工作。

10-05 20:43
查看更多