Mobile Safari Viewport - Preventing Horizontal Scrolling?

后端 未结 6 699
轮回少年
轮回少年 2020-12-13 19:49

I\'m trying to configure a viewport for mobile Safari. Using the viewport meta tag, I am trying to ensure that there\'s no zooming, and that you can\'t scroll the view horiz

6条回答
  •  猫巷女王i
    2020-12-13 20:00

    Is it possible that I've got some page element pushing the content out?

    Yes, that is indeed the case. The viewport setting only defines the visible viewport area but does not deal with turning off sideway panning.

    So, in order to avoid this from happening, set an overflow:hidden on the element that contains your content, or else, avoid elements from overflowing.

    NB: other mobile browsers also support the viewport meta tag since a while, so you'll want to test in those as well.

提交回复
热议问题