aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/css/scroll-margin-top/index.html
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/css/scroll-margin-top/index.html
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/css/scroll-margin-top/index.html')
-rw-r--r--files/zh-cn/web/css/scroll-margin-top/index.html71
1 files changed, 71 insertions, 0 deletions
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
+---
+<div>{{CSSRef}}</div>
+
+<p><code>scroll-margin-top</code> 属性定义了滚动捕捉区域的顶边距,用于在捕捉视口上捕捉该盒子。滚动捕捉区域是由变换后的边框决定的,找到它的矩形边界框(在滚动容器的坐标空间轴中轴对齐),然后添加指定的起始点。</p>
+
+<div>{{EmbedInteractiveExample("pages/css/scroll-margin-top.html")}}</div>
+
+
+
+<h2 id="Syntax" name="Syntax">语法</h2>
+
+<pre class="brush: css notranslate">/* &lt;length&gt; values */
+scroll-margin-top: 10px;
+scroll-margin-top: 1em;
+
+/* Global values */
+scroll-margin-top: inherit;
+scroll-margin-top: initial;
+scroll-margin-top: unset;
+</pre>
+
+<h3 id="Values" name="Values">值</h3>
+
+<dl>
+ <dt><code><var>&lt;length&gt;</var></code></dt>
+ <dd>滚动容器顶部边缘的起点</dd>
+</dl>
+
+<h2 id="标准定义">标准定义</h2>
+
+<p>{{cssinfo}}</p>
+
+<h2 id="标准语法">标准语法</h2>
+
+<pre class="syntaxbox notranslate">{{csssyntax}}</pre>
+
+<h2 id="规范">规范</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">规范</th>
+ <th scope="col">状态</th>
+ <th scope="col">注释</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName("CSS Scroll Snap Points", "#propdef-scroll-margin-top", "scroll-margin-top")}}</td>
+ <td>{{Spec2("CSS Scroll Snap Points")}}</td>
+ <td>Initial definition</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+<p class="hidden">The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>
+
+<p>{{Compat("css.properties.scroll-margin-top")}}</p>