
[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
你可能有興趣
HTTP的GET METHOD
使用http 的get 方法取得網頁資料
[Linux] wget 指定資料匣和wget 略過https的檢查
遇到失效的https網頁,wget無法抓檔,怎麼解決?
免費抓畫面軟體 Greenshot
明明Windows就已經有附畫面截取工具,為什麼還要推薦這個?
[PHP] 由於 scheme 不同,Cookie「_ga」在未來會被視為對XXX的跨網站 cookie
最近發現主控台出現這類的警告,很煩人…
[Mac] Forticlient 'Connection Error' '連接錯誤'
mac 筆電上的 forticlient突然不能連了,不知發生什麼事?
[PERL] 貪婪和不貪婪比對 non-greedy match
預設perl是貪婪比對,如果要取得不貪婪的比對,要怎麼做?