background-attachment
背景画像の固定表示
background-attachment: 値;
背景画像の固定表示を指定するプロパティです。(ウィンドウに対する固定表示となります)
このスタイルを設定すると、背景画像がスクロールされなくなります。
background-attachment: fixed;
プロパティ名 | 値 | 説明 |
---|---|---|
background-attachment | scroll | 固定しない (初期値) |
fixed | 固定する |
.example {
background-color: #ffffff;
background-image: url(back.gif);
background-attachment: fixed;
}