*html講座*
素材を背景に固定したい場合。
それぞれ、<head>〜</head>に下のタグをコピー・ペーストしてください。
右上固定
<STYLE TYPE="text/css"> <!-- body{background:url(画像のアドレス) fixed; background-position:right top; background-repeat:no-repeat;} //--> </style>
右下固定
<STYLE TYPE="text/css"> <!-- body{background:url(画像のアドレス) fixed; background-position:right bottom; background-repeat:no-repeat;} //--> </style>
左上固定
<STYLE TYPE="text/css"> <!-- body{background:url(画像のアドレス) fixed; background-position:left top; background-repeat:no-repeat;} //--> </style>
左下固定
<STYLE TYPE="text/css"> <!-- body{background:url(画像のアドレス) fixed; background-position:left bottom; background-repeat:no-repeat;} //--> </style>
中央固定
<STYLE TYPE="text/css"> <!-- body{background:url(画像のアドレス) fixed; background-position:center; background-repeat:no-repeat;} //--> </style>
↓
↓
↓
↓
↓
↓
↓
↓
ほら、スクロールしても背景が動かないでしょ?
アクセス解析