Fix: Correct descriptions of clientX and pageX#1233
Open
yzws1001 wants to merge 1 commit intojavascript-tutorial:masterfrom
Open
Fix: Correct descriptions of clientX and pageX#1233yzws1001 wants to merge 1 commit intojavascript-tutorial:masterfrom
yzws1001 wants to merge 1 commit intojavascript-tutorial:masterfrom
Conversation
The clientX/Y and pageX/Y descriptions of mouse events are opposite
songhn233
suggested changes
Jan 4, 2025
| 我们已经在 <info:coordinates> 中解释过它们之间的区别。 | ||
|
|
||
| 简而言之,相对于文档的坐标 `pageX/Y` 以文档的左上角为参照物,并且同一位置的坐标不随页面的滚动而改变。相对于窗口的坐标 `clientX/Y` 以当前窗口的左上角为参照物,并且同一位置的坐标会随着页面的滚动而改变。 | ||
| 简而言之,相对于文档的坐标 `clientX/Y` 以文档的左上角为参照物,并且同一位置的坐标不随页面的滚动而改变。相对于窗口的坐标 `pageX/Y` 以当前窗口的左上角为参照物,并且同一位置的坐标会随着页面的滚动而改变。 |
Member
There was a problem hiding this comment.
这里似乎没反?client 就是针对窗口的,page 是针对文档的
|
Please make the requested changes. After it, add a comment "/done". |
1 similar comment
|
Please make the requested changes. After it, add a comment "/done". |
|
Please make the requested changes. After it, add a comment "/done". |
1 similar comment
|
Please make the requested changes. After it, add a comment "/done". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The clientX/Y and pageX/Y descriptions of mouse events are opposite
目标章节:2-ui/3-event-details/1-mouse-events-basics/article.md
当前上游最新 commit:javascript-tutorial/en.javascript.info@34a80e7
本 PR 所做更改如下: