Webpage starts zoomed in on mobile devices

前端 未结 11 1743
有刺的猬
有刺的猬 2020-12-05 06:42

I\'m using this code on my webpage


I would thin

相关标签:
11条回答
  • 2020-12-05 06:52

    Try out this will help you...This worked for me

     <meta name="viewport" initial-scale=1.0 content="width=100%">
    
    0 讨论(0)
  • 2020-12-05 06:53

    Try this:

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

    or

    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1" />
    
    0 讨论(0)
  • 2020-12-05 06:56

    The answer is already here in the website that we are using.

    If you inspect element the StackOverflow and look for the meta viewport of it. You will see

    <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, minimum-scale=1.0">
    

    So you are setting the width and height depends on which is the width, and height of the screen in CSS pixels at a scale of 100%. The initial-scale property controls the zoom level when the page is first loaded. And lastly minimum-scale is an optional attribute for the viewport, and it defines the minimum zoom that website users are able to do.

    0 讨论(0)
  • 2020-12-05 06:56

    You can use this.

        <meta name="viewport" content="width=100%">
    
    0 讨论(0)
  • 2020-12-05 06:58

    None of the answers above worked for me and I managed to figure out the answer.

    The initial meta tag was had an initial-scale of 1.

    To load the website without zooming in you have to change the initial-scale from 1 to 0.

    <meta name="viewport" content="width=device-width, initial-scale=0, maximum-scale=1">
    
    0 讨论(0)
  • 2020-12-05 07:00

    I've had a similar problem. Try this:

    <meta name="viewport" content="width=1000; initial-scale=1, maximum-scale=1, minimum-scale=1"/>
    

    I think it has to do with the minimum-scale, but I'm not very sure.

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