在背景上的多个图像

时间:2010-09-01 17:50:41

标签: css

我正在尝试使用此CSS代码创建包含多个背景图像的页面:

body {
 background-image:url(../i/bg_bf.jpg), url(../../../../test.png) ;
 background-position:  top center, bottom left;
 background-repeat:no-repeat;
 padding-top:3px;
}

它适用于Firefox,但在IE中不显示任何图像。

有什么建议吗?

2 个答案:

答案 0 :(得分:4)

IE不支持多个背景/图片,至少在IE9 they're a CSS3 feature之前,您可以使用in the spec here找到它们specifics here

答案 1 :(得分:0)

您可能需要使用包装器

<body>
  <div id="windowWrapper">

CSS:

body {
 background-image:url(../i/bg_bf.jpg) no-repeat top center;
 padding-top:3px;
}

#windowWrapper {
 background-image:url(../i/test.jpg) no-repeat top center;
}