我需要背景图像保持居中,因为我要在固定位置显示图表,并且希望图像中的货车始终可见。它在Chrome等工作正常,但没有出现在IE8中。我的div背景图像在IE8中不显示
http://clients.online95.com/RzMaOxkMOC/rep_mktsh.php
谢谢您可以提供任何帮助。
#aa_breakdown_bg {
background: url(/RzMaOxkMOC/images/aa_breakdown_bg.jpg) center top no-repeat fixed;
overflow: hidden;
height: 100%;
}
<html lang="en">
<head>
<title>UK Breakdown Market Tracker</title>
<meta http-equiv="X-UA-Compatible" content="IE=9" />
<script type="text/javascript">
window.history.forward();
function noBack() { window.history.forward(); }
</script>
</head>
<body onload="noBack();" onpageshow="if (event.persisted) noBack();" onunload="">
<div id="aa_breakdown_bg"></div>
</body>
</html>
我发现了一个非常简单的解决方案 - 只需在css中添加一个最小高度 - 为什么我不能在4个小时前尝试过呢! – 2013-03-17 15:35:07