I have a mobile website but it loads zoomed out. How can I fix this?

老子叫甜甜 提交于 2019-12-01 17:19:47

You should insert the Viewport meta tag.

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

This means that the browser will (probably) render the width of the page at the width of its own screen. So if that screen is 320px wide, the browser window will be 320px wide, rather than way zoomed out and showing 960px (or whatever that device does by default, in lieu of a responsive meta tag).

Reference: Css-Tricks - Responsive Meta Tag - MDN - Using the viewport meta tag to control layout on mobile browsers

You might need to set the viewport

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

http://davidbcalhoun.com/2010/viewport-metatag/

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