壁紙を固定する

★下のソースを<HEAD>と</HEAD>の間にコピペします♪


★固定してのみの繰り返し

<STYLE>
<!--
BODY{
background-image : "○○○.jpg";
background-repeat : repeat-x;
background-attachment : fixed;
}
-->
</STYLE>


左上に固定

<STYLE>
BODY {
background-position: top left;
background-repeat: no-repeat;
background-attachment:fixed;
}
</STYLE>

★ワンポイント

<STYLE>
body{ background-attachment : fixed;
background-repeat:no-repeat;
background-position: 80% 80%;
background-image : ○○○.gif;}
</STYLE>

壁紙固定「background-position: 20% 80%」のサンプル



☆縦のみの繰り返しは「repeat-x」を「repeat-y」にします。


☆固定の位置は「top」「bottom」「right」「left」などとその組み合わせ
 で指定できます。

☆ワンポイントの位置は%またはピクセルで指定します。
 50%、50%で真ん中になります。



Back