スタイルシートを使う
▼ページの背景に画像を横にだけ表示する
背景画像をレイアウトしてみましょう。背景画像には下の画像を使用します。

<head>から</head>の間に以下のタグを挿入します。
<style type=text/css>
<!--
body
{
background-image:url(ここに画像のファイル名を記入);
background-attachment:fixed; ← 画像を固定するという意味
background-repeat:repeat-x; ← 画像横方向にだけ繰り返すという意味
-->
</style> |
<html>
<head>
<title>
私のホームページ
</title>
<style type=text/css>
<!--
body
{
background-image:url(img/ic.jpg);
background-attachment:fixed;
background-repeat:repeat-x;
-->
</style>
</head>
<body text="#999999" link="#0000FF" vlink="#000099" alink="#000099">
〜中略〜
</body>
</html> |
サンプルページ
|