我需要背景圖像保持居中,因爲我要在固定位置顯示圖表,並且希望圖像中的貨車始終可見。它在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