Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix: Correct descriptions of clientX and pageX#1233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
yzws1001 wants to merge1 commit intojavascript-tutorial:master
base:master
Choose a base branch
Loading
fromyzws1001:patch-1
Open
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion2-ui/3-event-details/1-mouse-events-basics/article.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -139,7 +139,7 @@

我们已经在 <info:coordinates> 中解释过它们之间的区别。

简而言之,相对于文档的坐标 `pageX/Y` 以文档的左上角为参照物,并且同一位置的坐标不随页面的滚动而改变。相对于窗口的坐标 `clientX/Y` 以当前窗口的左上角为参照物,并且同一位置的坐标会随着页面的滚动而改变。
简而言之,相对于文档的坐标 `clientX/Y` 以文档的左上角为参照物,并且同一位置的坐标不随页面的滚动而改变。相对于窗口的坐标 `pageX/Y` 以当前窗口的左上角为参照物,并且同一位置的坐标会随着页面的滚动而改变。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

这里似乎没反?client 就是针对窗口的,page 是针对文档的


例如,如果我们有一个大小为 500x500 的窗口,并且鼠标在左上角,那么 `clientX` 和 `clientY` 均为 `0`,无论页面如何滚动。

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp