プロが教えるわが家の防犯対策術!

壁紙を固定したいのですがどうやってやるのかわかりません。
教えてください。

A 回答 (2件)

★壁紙の固定方法★


(1)壁紙を繰り返し並べた上で固定。
<body>のところを、
<body background="壁紙アドレス" bgproperties="fixed">
に書き換えて下さい。

★以下は<HEAD>~</HEAD>の間に貼り付けて下さい★

(2)左上に固定
<style type="text/css">
<!--
BODY{ background-image:url(画像のURL);
background-repeat:no-repeat;
background-attachment: fixed;
background-position: 0% 0% }
-->
</style>

(3)左上に固定
<style type="text/css">
<!--
BODY{ background-image:url(画像のURL);
background-repeat:no-repeat;
background-attachment: fixed;
background-position: 0% 0% }
-->
</style>

(4)右上に固定
<style type="text/css">
<!--
BODY{ background-image:url(画像のURL);
background-repeat:no-repeat;
background-attachment: fixed;
background-position: 100% 0% }
-->
</style>

(5)右下に固定
<style type="text/css">
<!--
BODY{ background-image:url(画像のURL);
background-repeat:no-repeat;
background-attachment: fixed;
background-position: 100% 100% }
-->
</style>

(6)左下に固定
<style type="text/css">
<!--
BODY{ background-image:url(画像のURL);
background-repeat:no-repeat;
background-attachment: fixed;
background-position: 0% 100% }
-->
</style>

(6)真中に固定
<STYLE TYPE="text/css"><!--
BODY { background: url(壁紙アドレス) no-repeat fixed center center }
--></STYLE>

(7)左側に並べて固定
<STYLE TYPE="text/css"><!--
BODY { background: url(壁紙アドレス) repeat-y }
--></STYLE>

(8)上に並べて固定
<STYLE TYPE="text/css"><!--
BODY{background-image:url(壁紙アドレス);background-repeat : repeat-x;background-attachment :fixed}
--></STYLE>

★といった感じですね(^-^
あまり濃い壁紙や柄のキツイ壁紙を使うと
文字が見にくくなりますのでテーブルを使うなどして
工夫してみて下さいね♪
    • good
    • 0

先日、スタイルシートを使った方法を別の方にお答えしましたので、ご参考下さい。



CGIでHTMLタグを出力するのでしょうか?
それでしたら、ヘッダーに当たる部分に下記ページでの回答を入れれば平気ですよ。

参考URL:http://oshiete1.goo.ne.jp/kotaeru.php3?q=133424
    • good
    • 0

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!