Skip to content

background-attachment

background-attachment CSS 属性决定背景图像的位置是在视口内固定,或者随着包含它的区块滚动。

<https://developer.mozilla.org/zh-CN/docs/Web/CSS/background-attachment>

语法

css
/* 关键 属性值 */
background-attachment: scroll;
background-attachment: fixed;
background-attachment: local;

/* 全局 属性值 */
background-attachment: inherit;
background-attachment: initial;
background-attachment: unset;

Background Attachment

用法

ClassProperties
bg-fixedbackground-attachment: fixed;
bg-localbackground-attachment: local;
bg-scrollbackground-attachment: scroll;

共 20 个模块,1301 篇 Markdown 文档。