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

前端 未结 2 581
天涯浪人
天涯浪人 2021-01-12 02:05

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

2条回答
  •  有刺的猬
    2021-01-12 02:32

    You should insert the Viewport meta tag.

    
    

    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

提交回复
热议问题