CSS元素边缘”outside”滚动框边缘是什么意思?

huangapple go评论55阅读模式
英文:

What does it mean for a CSS element edge to be "outside" a scrolling box's edge?

问题

以下是翻译好的部分:

> "如果元素边缘 A 和元素边缘 B 都在滚动框边缘 A 和滚动框边缘 B 之外,则不执行任何操作。"

根据这个回答,上述段落的定义应该是“如果已在视图中,则保持原位”。如果确实如此定义,那么该段落是否应该重新编写为“元素边缘 A 在滚动框边缘 A 之外,而元素边缘 B 在滚动框边缘 B 内”?假设“外部”意味着在下方,而“内部”意味着在上方(使用标准 Web 坐标系统)。

CSS 规范自 2016 年以来一直保持这种形式,因此规范应该是正确的。如何正确解释规范呢?

谢谢!

英文:

What is the proper way to interpret the following specification?

> "If element edge A and element edge B are both outside scrolling box
> edge A and scrolling box edge B, do nothing."

<br>

Source:

https://drafts.csswg.org/cssom-view/#dom-scrolllogicalposition-nearest:~:text=If%20element%20edge%20A%20and%20element%20edge%20B%20are%20both%20outside%20scrolling%20box%20edge%20A%20and%20scrolling%20box%20edge%20B

According to this answer, the definition of the above passage should be stays put, if it&#39;s already in view. If this is indeed the definition, then, shouldn't the passage be re-written as "element edge A is outside scrolling box edge A, and element edge B is inside scrolling box edge B"? Assuming "outside" means below, and "inside" means above (using the standard web coordinate system).

The CSS spec has been in this form since 2016, so the spec should be correct. What should be the proper way to interpret the spec?

Thanks!

答案1

得分: 2

"Outside" 表示元素对用户可见。相比之下,"inside" 表示元素位于用户看不到的区域。因此:

  • "outside scrolling box edge A" = 在滚动框边缘 A 之下
  • "outside scrolling box edge B" = 在滚动框边缘 B 之上
英文:

"Outside" means the element is visible to the user. In contrast, "inside" means the element is located in an area that is invisible to the user. Therefore:

  • "outside scrolling box edge A" = below scrolling box edge A

  • "outside scrolling box edge B" = above scrolling box edge B

huangapple
  • 本文由 发表于 2023年6月2日 02:13:47
  • 转载请务必保留本文链接:https://go.coder-hub.com/76384627.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定