문제

Is there a way to determine the position of the "viewport" in mobile safari on a web page? Like x, y, w, h pixel positions of what the phone is currently seeing on the page?

도움이 되었습니까?

해결책

In javascript (on Mobile Safari) you can use window.pageXOffset and window.pageYOffset to get the x and y offsets, window.innerWidth and window.innerHeight to get w and h.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top