
[JS/Jquery] ScreenX/Y, PageX/Y, ClientX/Y的差異
“ ScreenX, PageX, ClientX及ScreenY, PageY, ClientY的差異 ”
此文完整連結 http://n.sfs.tw/m10697
複製連結 [JS/Jquery] ScreenX/Y, PageX/Y, ClientX/Y的差異@精讚(文章歡迎轉載,請尊重版權註明連結來源)
2020-12-29 13:09:06 By 張○○
ScreenX, PageX, ClientX及ScreenY, PageY, ClientY的差異
pageX/Y gives the coordinates relative to the <html> element in CSS pixels.
clientX/Y gives the coordinates relative to the viewport in CSS pixels.
screenX/Y gives the coordinates relative to the screen in device pixels.
一目了然的圖片:
FIXED的物件要搭配clientX/clientY使用
ABSOLUTE的物件要搭配pageX/pageY使用
[相關連結]
https://stackoverflow.com/questions/6073505/what-is-the-difference-between-screenx-y-clientx-y-and-pagex-y
你可能有興趣
[Mac] Forticlient 'Connection Error' '連接錯誤'
mac 筆電上的 forticlient突然不能連了,不知發生什麼事?
[PERL] 貪婪和不貪婪比對 non-greedy match
預設perl是貪婪比對,如果要取得不貪婪的比對,要怎麼做?
[JS/Jquery] ScreenX/Y, PageX/Y, ClientX/Y的差異
ScreenX, PageX, ClientX及ScreenY, PageY, ClientY的差異
SELINUX 中網頁放在家目錄
家目錄中要放網頁,SELINUX中該如何設定?
Linux cp 複製或移動時保留權限和擁有者及群組的方法
使用小寫的 -p 參數來完成這項工作 % cp -p file1 /path/to/file2 如果要複製整個目錄,在
中式、日本年號、西元年份-完整對照表
簡易日本年號對照表,常常會用到