Why is my responsive html/css not working with mobile phone?

前端 未结 2 1406
既然无缘
既然无缘 2021-01-29 13:31

I\'ve created a test site. I\'ve used media queries in css but when I load the page on mobile, I don\'t see the mobile version and when I re-size the browser the site is respons

相关标签:
2条回答
  • 2021-01-29 13:48

    It was my mistake. I used javascript to override meta tag and it was causing issue in proper responsiveness. Fixed javascript.

    0 讨论(0)
  • 2021-01-29 13:54

    Add this to the head of your website:

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

    This will set the width of your page to follow the screen width of your device.

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