タグの絵本
>
CSS
> 背景画像を一枚だけページの右上に固定して置く
■背景画像を一枚だけページの右上に固定して置く
・使用するCSS
body {
background-attachment: fixed;
background-image: url(☆);
background-repeat: no-repeat;
background-position: right top;
}
補足≫
☆=画像URL
right topを変更すれば固定位置を変更できます。
・説明
CSSを使用し、背景画像を一枚だけページの右上に固定して置く
・使用例
ソース (テスト書き込み可)
<html> <head> <title>あなたのホームページ</title> <style type="text/css"> <!-- body { background-attachment: fixed; background-image: url(../image/o-moon001.jpg); background-repeat: no-repeat; background-position: right top; } --> </style> </head> <body bgcolor="#000000" text="#ffffff"> ホームページ作成中。頑張ります! <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> </body> </html>
Copyright (C) 2006 タグの絵本 All rights reserved.
→
index