safari iOS 13 text zoom - fix for for web pages

て烟熏妆下的殇ゞ 提交于 2020-01-16 08:43:12

问题


I have installed the developer version of iOS i.e. 13 to check the compatibility of our website and I see that safari now has a feature to zoom in/out web pages for readability. I see that most of pages or now broken if we zoom in. I want to fix this issue before the official release of iOS-13

I checked their own official website which is handled very nicely but they are actually not increasing the font size they just zoom in the page.

I tried various properties with this meta tag as well:

<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />

回答1:


This is how I fixed it.

@media screen and (max-width: 320px){ 
    html,body {
        min-width: 320px;
    }
}

Actually when you zoom-in, that means you are reducing your html and body width.




回答2:


Try to this code in css:

html {-webkit-text-size-adjust: none;}

Thanks



来源:https://stackoverflow.com/questions/57554457/safari-ios-13-text-zoom-fix-for-for-web-pages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!