背景画像の固定位置を指定する
下記のソースを<head>〜</head>の間に入れてね。
<style type="text/css"> <!-- body{ background-image: url(画像のアドレス); background-repeat: no-repeat; background-attachment: fixed; background-position: 85% 35%; } --> </style>
background-position:
85% 35%
;
この
%の数字
は、画面左上からの位置を表しています。
このサンプルでは左上から横方向へ85%、縦方向へ35%に固定しました。
pt、px、em等の指定もできます。
<style type="text/css"> <!-- body{ background-image: url(画像のアドレス); background-repeat: no-repeat; background-attachment: fixed; background-position: 400px 250px; } --> </style>
ブラウザの×ボタンで閉じて下さい