Css 是否有关于非视网膜显示的媒体查询?
根据,视网膜显示的未来证明媒体查询可以写为:Css 是否有关于非视网膜显示的媒体查询?,css,retina,Css,Retina,根据,视网膜显示的未来证明媒体查询可以写为: @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and ( min--moz-device-pixel-ratio: 2), only screen and ( -o-min-device-pixel-ratio: 2/1), only screen and ( min-device-pixel-ratio: 2), only s
@media
only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and ( min--moz-device-pixel-ratio: 2),
only screen and ( -o-min-device-pixel-ratio: 2/1),
only screen and ( min-device-pixel-ratio: 2),
only screen and ( min-resolution: 192dpi),
only screen and ( min-resolution: 2dppx) {
/* Retina-specific stuff here */
}
如果我想为非视网膜显示编写CSS代码呢
我知道你们可以先为非视网膜显示写一些CSS代码,然后用上面的媒体查询覆盖视网膜显示。但是有没有专门针对非视网膜显示的媒体查询?,同样是CSS技巧,声明您可以使用not反转逻辑。因此,理论上:
@media
not screen and (-webkit-min-device-pixel-ratio: 2),
not screen and ( min--moz-device-pixel-ratio: 2),
not screen and ( -o-min-device-pixel-ratio: 2/1),
not screen and ( min-device-pixel-ratio: 2),
not screen and ( min-resolution: 192dpi),
not screen and ( min-resolution: 2dppx) {
/* non-Retina-specific stuff here */
}