Skip to content

Commit 30ec4d2

Browse files
rfhitslevidingsonghn233
authored
feat: update translation (javascript-tutorial#1110)
* feat: update translation “to show”应当翻译为“展示”。“展示”和“显示”相比,更能体现人“主动”修改页面、呈现新元素的意思。 * Update article.md * Update article.md * Apply suggestions from code review Co-authored-by: Songhn <[email protected]> Co-authored-by: LeviDing <[email protected]> Co-authored-by: Songhn <[email protected]>
1 parent c814882 commit 30ec4d2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

2-ui/1-document/11-coordinates/article.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,9 @@ elem.style.background = ''; // Error!
146146
147147
## 用于 "fixed" 定位
148148
149-
为了显示元素附近的东西,我们可以使用 `getBoundingClientRect` 来获取其坐标,然后使用 CSS `position` 以及 `left/top`(或 `right/bottom`)。
149+
大多数时候,我们需要使用坐标来确定某些内容的位置。
150+
151+
想要在某元素附近展示内容,我们可以使用 `getBoundingClientRect` 来获取这个元素的坐标,然后使用 CSS `position` 以及 `left/top`(或 `right/bottom`)。
150152
151153
例如,下面的函数 `createMessageUnder(elem, html)` 在 `elem` 下显示了消息:
152154

0 commit comments

Comments
 (0)