再会。
我正在编写一个 JS 函数,如果页面通过询问是否在 android 中放大,则返回 true document.body.clientHeight < window.innerHeight。
它可以工作,但是当更改为横向时,document.body.clientHeight不会更新,那么这个条件总是返回 true。
现在,我尝试用clientHeight其他窗口/正文属性替换,但它们要么不更新方向更改,要么在缩放页面时遗憾地改变。
我需要:
- 在方向更改时更新但在页面缩放时固定的属性
isZoomed适用于 android 2+的更简单功能
在此先感谢您的时间