CSS media queries min-width and min-device-width conflicting?

前端 未结 2 1040
旧时难觅i
旧时难觅i 2020-11-30 01:49

I am very new to the world of media queries, and it\'s clear there\'s something fundamental I\'m missing about the difference between width and device-width -- other than th

2条回答
  •  自闭症患者
    2020-11-30 02:20

    device-width is deprecated in Media Queries Level 4. Refer to MDN docs here for more details.

    So, width and height features should be used to consider the width and height of the viewport respectively.

    P.S. These are range features they can be prefixed with min- or max- to express "minimum condition" or "maximum condition" constraints. Reference here.

提交回复
热议问题