Why is my Android device-width 980px?

前端 未结 3 1438
时光说笑
时光说笑 2020-12-31 23:53

I am confused. I am trying to make a website responsive by playing around with media queries.

according to most sources, for example this, the mediq-query to use for

3条回答
  •  长发绾君心
    2021-01-01 00:04

    You might want to try using max-width instead of max-device-width. It could well be a pixel-density thing - max-device-width might be reporting device pixels instead of CSS pixels.

    Here's a test page:

    • http://jsfiddle.net/56XhE/

    To really get a handle on this, you'll want to read Peter-Paul Koch's "A Tale of Two Viewports":

    • http://www.quirksmode.org/mobile/viewports.html
    • http://www.quirksmode.org/mobile/viewports2.html

    And possibly his recommendation on doing CSS for mobile devices:

    • http://www.quirksmode.org/blog/archives/2010/09/combining_meta.html

提交回复
热议问题