我正在使用http://www.chicowebdesign.com/blog/2010/10/21/updated-jquery-multiple-background-plug-in/
正如他们所说,但在IE中多重背景不起作用,任何想法,建议?
http://jsfiddle.net/6JtNr/(只是使用css)
我包括jQuery,包括加载jquery后的脚本..
想法?
答案 0 :(得分:1)
根据我的理解,阅读页面上的说明,您需要将您的CSS更改为:
.container {
/* For unsupported browsers /
background: url('../images/backgrounds/fifteen.jpg') no-repeat 13440px 0;
/ For CSS3 Supported Browsers */
background: url('../images/backgrounds/one.jpg') no-repeat top 0,
url('../images/backgrounds/two.jpg') no-repeat 960px 0,
url('../images/backgrounds/three.jpg') no-repeat 1920px 0,
url('../images/backgrounds/four.jpg') no-repeat 2880px 0,
url('../images/backgrounds/five.jpg') no-repeat 3840px 0,
url('../images/backgrounds/six.jpg') no-repeat 4800px 0,
url('../images/backgrounds/seven.jpg') no-repeat 5760px 0,
url('../images/backgrounds/eight.jpg') no-repeat 6720px 0,
url('../images/backgrounds/nine.jpg') no-repeat 7680px 0,
url('../images/backgrounds/ten.jpg') no-repeat 8640px 0,
url('../images/backgrounds/eleven.jpg') no-repeat 9600px 0,
url('../images/backgrounds/twelve.jpg') no-repeat 10560px 0,
url('../images/backgrounds/thirteen.jpg') no-repeat 11520px 0,
url('../images/backgrounds/fourteen.jpg') no-repeat 12480px 0,
url('../images/backgrounds/fifteen.jpg') no-repeat 13440px 0;
width: 14400px;
height: 1020px;
}
请注意,我将宽度和高度移到了底部,有些人在该库的注释中说,背景需要首先在样式标记中。此外,根据说明,您需要有一个单独的背景行,为不支持的浏览器调用最后一个背景图像。