滚动列表时为什么我的背景图像会出现?

时间:2013-08-08 12:02:15

标签: jquery jquery-mobile

enter image description here

我的页面上有一个滚动列表,带有重复的图像背景。我的问题是,当我滚动列表时,背景图像不会填满页面。我的CSS是:

background: transparent url(images/Background-Screen.png) repeat 0 0 !important;

enter image description here

2 个答案:

答案 0 :(得分:1)

您是否曾尝试阻止背景图片滚动?

background-attachment:fixed; // cause default value is "scroll"

在你的情况下:

background: transparent url(images/Background-Screen.png) repeat 0 0 fixed !important;

答案 1 :(得分:0)

试试这个:

body {
    background-image: url(img.jpg);
    background-position: center top;
    background-size: 100% auto;
}

或试试这个:

http://css-tricks.com/how-to-resizeable-background-image/