0

我正在使用 Wordpress 响应式主题,并且想要一个固定的背景。

background-repeat: no-repeat;
background-position: top center; 
background-attachment: fixed;

如果我将背景更改为

background-repeat: repeat;
background-position: top center;
background-attachment: scroll;  

并添加

html, body {
height: 100%;
}

这允许看到正文内容,但是在 Firefox (android) 上,您无法向下滚动页面以查看所有内容。在其他浏览器上滚动很慢。有没有办法使用在所有(大多数)手机浏览器上都可以显示的固定背景?谢谢你。

4

1 回答 1

0

你试过了吗 :

html {
  height:100%;
}
body {
  min-height:100%;
}

编写一个简短的代码以了解更多接下来会发生什么,内部 html 结构和它的 CSS

于 2013-06-11T22:36:10.943 回答