JavaScript调整大小事件滚动 - 移动 [英] javascript resize event on scroll - mobile
本文介绍了JavaScript调整大小事件滚动 - 移动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
任何建议?
解决方案
使用 onOrientationChange
事件和 window.orientation
属性。
另请参阅此答案。
这里将链接到测试页 。
I'm trying to make a website for mobile. I'm having the "resize" event binded on window, wich should rearrange elements when the mobile device is turning (portrait <-> landscape). On iPhone and Samsung Galaxy SII, the event is triggered when I'm scrolling down the page, and that's not good.
Any suggestions?
解决方案
Use the onOrientationChange
event and the window.orientation
property instead.
Also see this answer.
Here link to a test page.
这篇关于JavaScript调整大小事件滚动 - 移动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文