| 名前 | 解説 | サンプル |
|---|---|---|
| background-color | 背景色(RGB) | #00CCFF |
| background-image | 背景画像 | url('../img/34bar_sv.jpg') |
| background-repeat | 背景画像の繰り返し指定 | repeat-x; x方向に繰り返し repeat-y; y方向に繰り返し repeat; 縦横繰り返し no-repeat; 繰り返しなし |
| background-attachment | スクロール時の動作 | scroll; 一緒にスクロール fixed; スクロールしない |
| background-position | 背景の位置をX座標/Y座標で指定する | X: left center right Y: top center bottom 共通:pt px pc | em ex | mm cm in | % |
body {
background-image: url('../img/p01.jpg');
}
body {
background: #000000;
}
h1 {
background-image: url('../img/34bar_sv.jpg');
background-repeat: repeat-x;
}
div.sample {
background-image: url('../img/bg-green-wall.gif');
}
div.sample {
background-color: #99FFCC;
}