From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/css/scroll-margin-top/index.html | 71 ++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 files/zh-cn/web/css/scroll-margin-top/index.html (limited to 'files/zh-cn/web/css/scroll-margin-top/index.html') diff --git a/files/zh-cn/web/css/scroll-margin-top/index.html b/files/zh-cn/web/css/scroll-margin-top/index.html new file mode 100644 index 0000000000..499f5f0a41 --- /dev/null +++ b/files/zh-cn/web/css/scroll-margin-top/index.html @@ -0,0 +1,71 @@ +--- +title: scroll-margin-top +slug: Web/CSS/scroll-margin-top +tags: + - CSS + - CSS Property + - Reference + - Web + - scorll-margin + - scroll-margin-top +translation_of: Web/CSS/scroll-margin-top +--- +
{{CSSRef}}
+ +

scroll-margin-top 属性定义了滚动捕捉区域的顶边距,用于在捕捉视口上捕捉该盒子。滚动捕捉区域是由变换后的边框决定的,找到它的矩形边界框(在滚动容器的坐标空间轴中轴对齐),然后添加指定的起始点。

+ +
{{EmbedInteractiveExample("pages/css/scroll-margin-top.html")}}
+ + + +

语法

+ +
/* <length> values */
+scroll-margin-top: 10px;
+scroll-margin-top: 1em;
+
+/* Global values */
+scroll-margin-top: inherit;
+scroll-margin-top: initial;
+scroll-margin-top: unset;
+
+ +

+ +
+
<length>
+
滚动容器顶部边缘的起点
+
+ +

标准定义

+ +

{{cssinfo}}

+ +

标准语法

+ +
{{csssyntax}}
+ +

规范

+ + + + + + + + + + + + + + + + +
规范状态注释
{{SpecName("CSS Scroll Snap Points", "#propdef-scroll-margin-top", "scroll-margin-top")}}{{Spec2("CSS Scroll Snap Points")}}Initial definition
+ +

浏览器兼容性

+ + + +

{{Compat("css.properties.scroll-margin-top")}}

-- cgit v1.2.3-54-g00ecf