下面是一个简单的代码,我在其中为正文实现了多个背景图像,但是这段代码在 IE 7 和 8 中不起作用,而在所有其他浏览器中都起作用。我已经使用了相对于html文档的PIE.htc,但仍然没有成功。请帮我解决这个例子。
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body style="background: url(header_top_border.png) repeat-x, url(bg_1px.jpg) repeat-x; behavior: url(http://localhost/mutliple_bg/PIE.htc);
-pie-background:url(header_top_border.png) repeat-x, url(bg_1px.jpg) repeat-x; position:relative; zoom:1; z-index:1;">
</body>
</html>
最佳答案
抱歉匆忙阅读了您的问题,刚刚注意到您使用的是馅饼。 PIE 不支持 BODY 元素的多个背景;
解决方案:为 body 创建 div 容器。
关于css - 多个背景图像在 IE8 和 IE7 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11932417/