这是一个Android的bug。有时候当页面首次加载时,window.screen.width和window.screen.height会显示错误。你可以尝试设置一个延迟时间,然后再运行你的代码。 setTimeout(YourFunction, 200); Also see here android issue