0

ローカルで実行されているさまざまなブラウザ(仮想サーバー上のApache)でテストすると、すべて問題ありませんが、ホストでFTP経由でアップロードすると、背景色も設定されている場合、背景画像は表示されません。

ケース番号1:

body {
font-family: Candara, Tahoma, Verdana;
font-size: 0.9em;
color: white;
background: #242424 url("/Images/background.png") no-repeat top center;
}

ケース no2:

#top {
position: relative;
border-radius: 5px;
text-align: left;
background-color: #CC0000;
background-image: url("/Images/sky_banner.png");
background-position: top;
background-repeat: no-repeat;
height: 200px;
}

.top-content {
position: absolute;
bottom: 0;
left: 0;
}

「背景色」プロパティを削除すると、画像が表示されます。

4

1 に答える 1

0

このコードを試してください...

element{
    background-image:url(background.png.png);
    background-repeat:no-repeat;
    background-color:#242424;
    background-position: top center;
}

background-image の後に background-color プロパティを使用する

于 2013-08-02T04:17:34.240 に答える