iPad doesn't trigger resize event going from vertical to horizontal?

后端 未结 7 738
醉酒成梦
醉酒成梦 2020-12-08 00:33

Has anyone noticed this behavior? I\'m trying to write a script that will trigger upon a resize. It works fine on normal browsers, works fine on iPhone, but on iPad, will on

7条回答
  •  臣服心动
    2020-12-08 01:27

    I think what you want would be to use the iPad Orientation CSS, which looks like this:

    
    
    

    Also, the orientationchange event fires when the orientation is changed, according to iPad web development tips.

    Together, that should give you tools enough to deal with the change.

提交回复
热议问题