0

つまり、ChromeとFFは問題ありません。IE9だけがHTMLの背景を表示できません。色は表示されますが、画像は表示されません。どうすれば適切に動作させることができますか?

それをテストしてください:ここ

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
html {
    width:100%;
    height:100%;
    background-color: #ffeacd;
    background-image: url(bg.png);
    background-position: 0px 0px;
    background-repeat: repeat-x;
    margin: 0px;
    padding: 0px;
}
body {
    background-position: center top;
    width:100%;
    height:100%;
    margin: 0px;
    padding: 0px;
    background-image: url(bg_overlay.png);
    background-repeat: no-repeat;
}
.content {
    width:1020px;
    height: 100%;
    padding: 0px;
    margin-top: 0px;
    margin-right: auto;
    margin-bottom: 0px;
    margin-left: auto;
}
</style>
</head>
<body>
<div class="content"></div>
</body>
</html>
4

1 に答える 1

3

IEはhtml要素の背景画像タグを許可していないようです。このようなことをしてみてください。

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
body {
width:100%;
height:100%;
background-color: #ffeacd;
background-image: url(header-ad.png);
background-position: 0px 0px;
background-repeat: repeat-x;
margin: 0px;
padding: 0px;
}
#wrapper {
background-position: center top;
width:100%;
height:100%;
margin: 0px;
padding: 0px;
background-image: url(hdr_GSA_lp.jpg);
background-repeat: no-repeat;
}
.content {
width:1020px;
height: 100%;
padding: 0px;
margin-top: 0px;
margin-right: auto;
margin-bottom: 0px;
margin-left: auto;
}
</style>
</head>
<body>
<div id="wrapper">
<div id="content">

</div>
</div>
</body>
于 2012-05-07T12:59:52.730 に答える