名前解説サンプル
背景[background]背景に関する指定をまとめて行う#f8dce0 url("/img/p01.jpg")
背景色[background-color]背景色を指定する#99cc00
背景画像[background-image]背景画像を指定するURI(URL)で画像ファイルを指定します。
背景画像のリピート
[background-repeat]
背景画像のリピートの仕方を指定するrepeat / repeat-x / repeat-y / no-repeat

CSSリファレンス:目次

背景を指定する

《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>
TOPへ


inserted by FC2 system