[英]Why isn't the background image appearing on IE8?
背景圖片沒有出現在IE8中,但在包括IE9在內的所有瀏覽器中都可以正常工作
相關CSS:
#player {
background: url('/images/tv-screen.jpg') center top repeat-x;
padding: 25px 26px 0 -1px;
width: 660px;
height: 403px;
border: #555 solid 1px;
margin-top: 0;
margin-bottom: 0;
}
相關HTML:
<p id="player">...//some data ..</p>
CSS看起來還不錯。
我認為IE8在標記本身上失敗: <p id="player>
。id屬性沒有結束符"
。 如果這導致該ID被誤解,則CSS選擇器將不匹配該ID。
問題是:iframe中有一個iframe擋住了背景,我不知道為什么,即使我用wmode = transparent制作了兩個iframe。
因此,我在IE中的js中最后一個iframe中創建的背景小於9。
謝謝你們的時間。
您使用的是正確的DOCTYPE嗎?
您是否嘗試過刪除設置的負填充。 這可能會導致ie7 / 8中出現問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.