背景画像の表示位置の設定ブロックの背景に設定した画像の表示位置を設定するには、 background-positionプロパティを設定します。 background-position: 表示位置 /pre> #spanend #spanadd background-position: 横の表示位置 縦の表示位置 #spanend #spanadd background-position: 横の表示位置 #spanend #spanadd background-positionプロパティは、 背景画像のウィンドウの中での表示位置を指定します。 並べ方には、次の4種類があります。 プロパティを指定していない状態は、「repeat」を指定したときと同じ状態です。
#spanend body { background-image: url(bgimage.gif); background-repeat: repeat-y; background-repeat: no-repeat; background-position: center center; } #spandel </pre> #spanend #spanadd
}} |