壁紙が、固定できない
-
0 名前: 初心者 : 2006/02/21 17:02
- 背景画像を、左下に固定したいのですが、画面一杯に画像が連なって出てきます。
<style type="text/css">
<!--
body
{
background-image : url("画像URL");
background-repeat: repeat-y;
background-attachment: fixed;
}
-->
</style>
で、失敗しました・・・
レスおねがいします!!!!
-
1 名前: 匿名希望 : 2006/02/21 17:02
- <style type="text/css">
<!--
body{
background-image: url("背景画像");
background-repeat: no-repeat;
background-position: left bottom;
background-attachment: fixed;
}
-->
</style>
こんな感じでどうですか?
-
2 名前: ゆえ : 2006/02/21 17:02
- 壁紙を固定とありますが、画面右下に1つだけ表示させたいのでしたら
「background-repeat: repeat-y;」
この部分を「background-repeat: no-repeat;」と記述します。
詳しい解説は以下をご参考に
http://www.tagindex.com/stylesheet/page/background_image2.html
また、表示位置を右下と指示する際は
「background-position: left bottom;」と記述します
こちらは固定させる画像の位置を設定するものです。
http://www.tagindex.com/stylesheet/page/background_image3.html
スタイルシートはその意味がわかっていないと、困る場面が多々でてきますので
まずはそれぞれの意味をちゃんと把握してから、設定することをお勧めします。