小技集
背景の固定の仕方
<HEAD>〜</HEAD>の間に入れてください。
・背景そのものを固定したい場合(書かれた文字はスクロールする)
| <body background="〇〇.jpgorgif )" bgproperties="fixed"> |
・右上に固定
| <STYLE type="text/css"><!-- BODY { background-image : url("画像ファイル名.jpg.gif"); background-attachment: fixed; background-position:100% 0%; background-repeat: no-repeat;} --> </STYLE> |
・左上に固定
| <STYLE type="text/css"><!-- BODY { background-image : url("画像ファイル名.jpg.gif"); background-attachment: fixed; background-position:0% 0%; background-repeat: no-repeat;} --> </STYLE> |
・右下に固定
| <STYLE type="text/css"><!-- BODY { background-image : url("画像ファイル名.jpg.gif"); background-attachment: fixed; background-position:100% 100%; background-repeat: no-repeat;} --> </STYLE> |
・左下
| <STYLE type="text/css"><!-- BODY { background-image : url("画像ファイル名.jpg.gif"); background-attachment: fixed; background-position:0% 100%; background-repeat: no-repeat;} --> </STYLE> |
・中央に固定
| <STYLE
type="text/css"><!-- BODY { background-image : url("画像ファイル名.jpg.gif"); background-attachment: fixed; background-repeat: no-repeat;} --> </STYLE> |
まず使いたい画像のjpgやgifを自分のHPサーバーにアップします
アップした後のその素材の持つurl(http/・・・・・・・)を書きかえます