背景画像を指定します。
IE4 / IE5 / IE5.5 / IE6 / N4 / N6 / N7 / O6 / O7 / O9 / Fx1 / Fx2 / IE5 mac
要素[.class名][#id名]{ backgorund-image : 値; }
| 値 | 初期値 | 意味 |
| none | ○ | 画像を表示しません。 |
| 画像URL | 指定したURLの画像を表示します。 | |
| inherit | 親要素の値を継承します。 |
<html>
<head>
<title>サンプルコード</title>
<style type="text/css">
#sample1 {
background-image : url(../../../../images/development/htmlcss/background-sample.gif);
height : 200;
width : 25%;
}
#sample2 {
background-image : url(../../../../images/development/htmlcss/background-sample.gif);
border-collapse:separate;
border : solid #000000 thin;
}
#sample3 {
background-color : #ffffff;
border : solid #000000 thin;
}
</style>
</head>
<body>
<div id="sample1">backgorund-imageサンプル</div>
<br>
<table id="sample2">
<tr>
<td id="sample3">データ1</td>
<td>データ2</td>
</tr>
</table>
</body>
</html>
| データ1 | データ2 |