背景画像を縦一列に固定

   写真やイラストを一枚の壁紙として 好きな箇所に表示させる方法です。
スクロールしても背景は移動しません

     

   固定背景ソース
(下のソースを<HEAD>〜</HEAD>の間に入れます。)
他例
左縦一列に固定    
<STYLE type="text/css">
<!--
BODY{
background-attachment;
background-repeat: repeat-y;
background-attachment: fixed;
background-image : url(画像のURL);
} -->
</STYLE>

   
    
<STYLE type="text/css">
<!--
BODY{
background-image:url(画像のURL);
background-repeat : repeat-y;
background-attachment : fixed;
background-position : left top;
}
-->
</STYLE>
  
右縦一列に固定    
<STYLE type="text/css">
<!--
BODY{
background-attachment;
background-repeat: repeat-y;
background-attachment: fixed;
background-position: 100% 0%;
background-image : url(画像のURL);
} -->
</STYLE>

   
   
<STYLE type="text/css">

<!--
BODY {
background-image : url(画像のURL);
background-repeat: repeat-y;
background-attachment: fixed;
background-position: right;
}-->
</STYLE>
   
好きな位置で縦一列に固定    
<STYLE type="text/css">
<!--
BODY{
background-attachment;
background-repeat: repeat-y;
background-attachment: fixed;
background-position:
左からの距離% 0%;
background-image : url(
画像のURL);
}
-->
</STYLE>
   

           

◇ ソース中の赤文字に、表示させたい、画像のURLを入れてます。○.gif や ○.jpgなど
       
http://○○/○.gif のように、入れても表示されます。
       (画像のURLは、ページと同じフォルダ(ディレクトリ)に画像を入れてUPするなら、ファイル名だけでOKです)
◇ ページの背景色を指定するには カラーコードより色を選び background-color : 背景色; 
      青文字の所に入れます。( #0000ff など)

                 

◇ ◇ ◇ ◇ ◇ ◇ ◇ ◇ ◇ ◇ ◇ ◇ ◇ ◇ ◇ ◇ ◇ ◇ ◇ ◇

      

ここのページの固定背景ソースは、下の様になってます。
右縦一列に固定
     
<head>
 
<STYLE type="text/css">
<!--
BODY{
background-attachment;
background-repeat: repeat-y;
background-attachment: fixed;
background-position: 100% 0%;
background-image : url(mate/sai2.gif);
} -->
</STYLE>
 
 
</head>

    

  

    

当サイトの素材は版権元の出版社、作者等とは一切関係ありません。