名前 | 解説 | サンプル |
---|---|---|
背景[background] | 背景に関する指定をまとめて行う | #f8dce0 url("/img/p01.jpg") |
背景色[background-color] | 背景色を指定する | #99cc00 |
背景画像[background-image] | 背景画像を指定する | URI(URL)で画像ファイルを指定します。 |
背景画像のリピート [background-repeat] | 背景画像のリピートの仕方を指定する | repeat / repeat-x / repeat-y / no-repeat |
《sample.css》
<style type="text/css"> body { background: #CCFFCC url('/img/p01.jpg') no-repeat center center; } </style>
《sample.css》
<style type="text/css"> body { background-color: #CCFFCC; } </style>
《sample.css》
<style type="text/css"> body { background-image: url('/img/p01.jpg'); } </style>
《sample.css》
<style type="text/css"> body { background-image: url('/img/p01.jpg'); background-repeat: repeat-y; } </style>