What is the difference between screenX/Y, clientX/Y and pageX/Y?

后端 未结 7 1500
夕颜
夕颜 2020-11-22 13:38

What is the difference between screenX/Y, clientX/Y and pageX/Y?

Also for iPad Safari,

7条回答
  •  说谎
    说谎 (楼主)
    2020-11-22 14:15

    clientX/Y refers to relative screen coordinates, for instance if your web-page is long enough then clientX/Y gives clicked point's coordinates location in terms of its actual pixel position while ScreenX/Y gives the ordinates in reference to start of page.

提交回复
热议问题