背景画像の並べ方のレンダリング

 
背景
ホーム > CSS2 Note > background-repeat > 背景画像の並べ方のレンダリング

repeat 背景画像をタイル状に敷き詰める(初期値)

<style type="text/css"><!--
body {background:url(img/roll.gif); background-repeat:repeat;}
--></style>

<body>
</body>
背景には以下のような画像を指定しています。
ロールティシューダブル
 

repeat-x 背景画像を横方向に並べる

<style type="text/css"><!--
body {background:url(img/roll.gif); background-repeat:repeat-x;}
--></style>

<body>
</body>
背景には以下のような画像を指定しています。
ロールティシューダブル
 

repeat-y 背景画像を縦方向に並べる

<style type="text/css"><!--
body {background:url(img/roll.gif); background-repeat:repeat-y;}
--></style>

<body>
</body>
背景には以下のような画像を指定しています。
ロールティシューダブル
 

no-repeat 背景画像を繰り返さずひとつだけ表示

<style type="text/css"><!--
body {background:url(img/roll.gif); background-repeat:no-repeat;}
--></style>

<body>
</body>
背景には以下のような画像を指定しています。
ロールティシューダブル
 
トップページ CSS2 Note ページトップ
 2009/02/01発行 2009/02/01更新