色と背景
color・・・テキストの文字色
例) body { color: #FF0000; } |
background・・・バックグラウンドのすべての属性(image, attachment, color, repeat, position)を一括して設定する
例) body { background: blue url(test.gif) scroll; } |
background-color・・・背景色
例) body { background-color: #0000FF; } |
|
background-image・・・背景の画像(url(xxx.gif):xxx.gifを指定,none:画像なし)
例) body { background-image: url(test.gif); } |
|
background-repeat・・・背景の画像の繰り返し(repeat:水平と垂直方向,repeat-x:水平方向,repeat-y:垂直方向,norepeat:繰り返しなし)
例) body { background-repeat: repeat-x; } |
|
background-attachment・・・背景の画像をコンテンツを共にスクロールさせるか指定する(scroll:スクロールする,fixed:スクロールしない)
例) body { background-attachment: scroll; } |
|
background-position・・・背景の画像の最初の位置を指定する
例) body { background-position: 20px 40px; } |
|
|
スポンサードリンク
|