iPhone Safari CSS rotation bug

前端 未结 2 1877
一个人的身影
一个人的身影 2021-02-11 06:56

I have a small mobile phone app that is acting strangely on the iPhone/Mobile Safari. The page renders and works great when it\'s orientation is vertical. When I rotate the phon

2条回答
  •  被撕碎了的回忆
    2021-02-11 07:30

    Have you tried including a viewport meta tag, such as this:

    
    

    Otherwise, you could try creating orientation-specific CSS stylesheets and swap them out w/ javascript when the orientation change event fires, but I prefer the meta tag method above.

提交回复
热议问题