From 4d9e624863b211070f0df5572389d64cec46abce Mon Sep 17 00:00:00 2001 From: BackRunner Date: Tue, 19 Oct 2021 22:24:45 +0800 Subject: Improve Web/API/IntersectionObserver/IntersectionObserver translation, zh-CN (#2736) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Web/API/IntersectionObserver 翻译修正 从技术上来说threshold是1意味着元素要完全出现,才会被视为可见,触发callback,这里更新翻译内容。 * Web/API/IntersectionObserver 翻译修正 * 修正翻译 --- .../zh-cn/web/api/intersectionobserver/intersectionobserver/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'files') diff --git a/files/zh-cn/web/api/intersectionobserver/intersectionobserver/index.html b/files/zh-cn/web/api/intersectionobserver/intersectionobserver/index.html index 2956916faa..8867c20a27 100644 --- a/files/zh-cn/web/api/intersectionobserver/intersectionobserver/index.html +++ b/files/zh-cn/web/api/intersectionobserver/intersectionobserver/index.html @@ -31,7 +31,7 @@ translation_of: Web/API/IntersectionObserver/IntersectionObserver
rootMargin
一个在计算交叉值时添加至根的边界盒({{Glossary('bounding_box')}})中的一组偏移量,类型为字符串(string) ,可以有效的缩小或扩大根的判定范围从而满足计算需要。语法大致和CSS 中的{{cssxref("margin")}} 属性等同; 可以参考 {{SectionOnPage("/en-US/docs/Web/API/Intersection_Observer_API", "The root element and root margin")}}来深入了解margin的工作原理及其语法。默认值是"0px 0px 0px 0px"。
threshold
-
规定了一个监听目标与边界盒交叉区域的比例值,可以是一个具体的数值或是一组0.0到1.0之间的数组。若指定值为0.0,则意味着监听元素即使与根有1像素交叉,此元素也会被视为可见. 若指定值为1.0,则意味着整个元素都是可见的(此段英文原文直译,正确性有待验证) 。可以参考{{SectionOnPage("/en-US/docs/Web/API/Intersection_Observer_API", "Thresholds")}} 来深入了解阈值是如何使用的。阈值的默认值为0.0。
+
规定了一个监听目标与边界盒交叉区域的比例值,可以是一个具体的数值或是一组0.0到1.0之间的数组。若指定值为0.0,则意味着监听元素即使与根有1像素交叉,此元素也会被视为可见. 若指定值为1.0,则意味着整个元素都在可见范围内时才算可见。可以参考{{SectionOnPage("/en-US/docs/Web/API/Intersection_Observer_API", "Thresholds")}} 来深入了解阈值是如何使用的。阈值的默认值为0.0。
-- cgit v1.2.3-54-g00ecf