|
|
左上固定の方法 | 右上固定の方法 |
<style type="text/css"> <!-- body{ background : url("画像の名前"); background-repeat: no-repeat; background-attachment: fixed; background-position: left top;} --> </style> |
<style type="text/css"> <!-- body{ background : url("画像の名前"); background-repeat: no-repeat; background-attachment: fixed; background-position: right top;} --> </style> |
左下固定の方法 | 右下固定の方法 |
<style type="text/css"> <!-- body{ background : url("画像の名前"); background-repeat: no-repeat; background-attachment: fixed; background-position: left bottom;} --> </style> |
<style type="text/css"> <!-- body{ background : url("画像の名前"); background-repeat: no-repeat; background-attachment: fixed; background-position: right bottom;} --> </style> |
[background-position] を%指定する場合は background-position : xx % yy % ;で表示します。 xx は横軸・yy は縦軸を表します。 従って
この%の指定を変えることでいろいろな場所に画像を表示させることが可能になります。 |