英文:
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:
According to this answer, the definition of the above passage should be stays put, if it'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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论