このサイトついて
SPONSORED LINK
テーブルの背景を変更したい
対応ブラウザ |
---|
使用するタグ:<table bgcolor="色指定">〜</table>など
テーブルの背景を変更したい場合は以下のとおりです。
・背景色を変えたい
<table bgcolor="色指定">〜</table>
<tr bgcolor="色指定">〜</tr>
<td bgcolor="色指定">〜</td>
<th bgcolor="色指定">〜</th>
・背景画像を設定したい
<table background="画像のURL">〜</table>
<tr background="画像のURL">〜</tr>※IE未対応
<td background="画像のURL">〜</td>
<th background="画像のURL">〜</th>
<table bgcolor="色指定">〜</table>
<tr bgcolor="色指定">〜</tr>
<td bgcolor="色指定">〜</td>
<th bgcolor="色指定">〜</th>
・背景画像を設定したい
<table background="画像のURL">〜</table>
<tr background="画像のURL">〜</tr>※IE未対応
<td background="画像のURL">〜</td>
<th background="画像のURL">〜</th>
例
HTMLソース
<table width="300">
<tr bgcolor="#996666"> <th >曜日</th> <th>クラス</th> </tr> <tr> <td bgcolor="#CC9966">月曜</td> <td background="../page/sample/background.gif"> 入門クラス</td> </tr> </table>
↓
<table width="300">
<tr bgcolor="#996666"> <th >曜日</th> <th>クラス</th> </tr> <tr> <td bgcolor="#CC9966">月曜</td> <td background="../page/sample/background.gif"> 入門クラス</td> </tr> </table>
ブラウザ上の表示
曜日 | クラス |
---|---|
月曜 | 入門クラス |