CSS3媒体查询(Media Queries)中device-width是获取手机设备的设备独立像素还是物理像素?求解!!!
发布网友
发布时间:2022-04-06 11:06
我来回答
共4个回答
热心网友
时间:2022-04-06 12:36
手机里css1个像素等于2个物理像素,写成min-width、max-width,400px已经算是极致了,它指手机浏览器的分辨率,而不是手机设备的屏幕分辨率
可以试试320、360、384、400这几个临界点
热心网友
时间:2022-04-06 13:54
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=0,minimal-ui">
声明viewport,就可以避免像素密度的问题
热心网友
时间:2022-04-06 15:28
似乎是对应浏览器分辨率
If you use max-device-width, when you change the size of
the browser window on your desktop, the CSS won't change, because your
desktop doesn't change size.
If you use max-width, when you change the size of the
browser window on your desktop, you might be shown mobile-orientated
styling, such as touch-friendly elements and menus and that kind of
thing.
http://stackoverflow.com/questions/18500836/should-i-use-max-device-width-or-max-width
热心网友
时间:2022-04-06 17:20
设备独立像素