Reset scale/width/zoom of Safari on iPhone using JavaScript/onorientationchange

前端 未结 7 1096
臣服心动
臣服心动 2021-02-02 00:24

I am displaying different content depending on how the user is holding his/her phone using the onorientationchange call in the body tag. This works great - I hide one div while

相关标签:
7条回答
  • 2021-02-02 01:24

    Here is what I use to deal with the zoom on my media-queries:

    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;">

    The maximum-scale is the thing that sold it for me. It means the transition from portrait to landscape on an iphone is really smooth with no zoom problems at all...

    0 讨论(0)
提交回复
热议问题