背景関連のプロパティー

background-color

背景色を指定する。

background-image

背景画像を付ける。

background-repeat

背景画像の繰り返し方を指定する。

background-attachment

背景画像を固定する。

background-position

背景画像の位置を指定する。

background

背景関連のプロパティーをまとめる。

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="ja">
<head>
<META http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
<META http-equiv="Content-Style-Type" content="text/css">
<title>背景画像を区切り線代わりに使う</title>
<style type="text/css">
<!--
h1 { font-size: 1.5em; }
h2 { font-size: 1.2em; }
div.section { padding-bottom: 1em;
background: url(back019-4.gif) repeat-x left bottom; }
-->

</style>
</head>
<body>

<h1>
背景関連のプロパティー
</h1>

<div class="section">
<h2>background-color</h2>
<p>背景色を指定する。</p>
</div>

<div class="section">
<h2>background-image</h2>
<p>背景画像を付ける。</p>
</div>

<div class="section">
<h2>background-repeat</h2>
<p>背景画像の繰り返し方を指定する。</p>
</div>

<div class="section">
<h2>background-attachment</h2>
<p>背景画像を固定する。</p>
</div>

<div class="section">
<h2>background-position</h2>
<p>背景画像の位置を指定する。</p>
</div>

<div class="section">
<h2>background</h2>
<p>背景関連のプロパティーをまとめる。</p>
</div>

</body>
</html>