背景画像を一枚だけページの中央に表示する

動作ブラウザ 【 IE:4.0  NN:6.0】 ■CSSバージョン【1】
Internet Explorer Netscape Navigator iCab Safari
3.0x 4.0x 4.5 5.0x 5.5 6.0 2.0x 3.0x 4.0x 4.x 6.0 7.0 2.x 1.x
Windows × - × × × × - -
Macintosh × - - × × × ×
UNIX - - - - - - × × × × - -

ポイント body { background-repeat:no-repeat; background-position:50%; }
説  明 ページの背景画像を中央に一枚だけ表示するにはスタイルの定義でbodyにbackground-repeat:no-repeat;background-position:50%;のように指定します。
サンプル <html> <head> <title>背景画像を一枚だけページの中央に表示する</title> <style type="text/css"><!-- body { background-repeat:no-repeat; background-position:50%; } --></style> </head> <body background="bg.gif"> 背景画像がページの中央に一枚だけ表示されます。 </body> </html>
補足説明 なし

■サンプルを実行する >>実行
■各ブラウザでの動作結果を見る >>View!