CSS - background-repeat
background-repeat
解説
バックグラウンド画像の繰り返し方法を指定する。
構文
{ background-repeat: repeat | repeat-x | repeat-y | no-repeat}
注意事項
この属性はバックグラウンド画像が指定されている場合に有効である。repeatを指定した場合は画像を水平と垂直の両方方向に繰り返す。repeat-xは画像を水平方向に繰り返す。repeat-yは画像を垂直方向に繰り返す。no-repeatは繰り返しを行わない。
この属性は継承されない。
例
次の例は、垂直方向のみ繰り返すように指定している。
BODY {background: red url(pendant.gif); background-repeat: repeat-y;}