本文介绍了iMac 5k分辨率的媒体查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在iMac 5k显示屏上显示基于八列网格的 Flexbox (5120×2880),但是我无法理解我仅用于哪种媒体查询5K分辨率!

I,m trying to show eight column grid based Flexbox on iMac 5k display (5120 × 2880) but I could not understand which media query exactly I used for only 5K resolution !

@media(-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { 
/* Retina-specific stuff here */
}

我还希望只有5K分辨率会产生影响,而且以4k显示分辨率显示其预期效果

I also want only 5K resolution will effects, moreover in 4k display resolution its showing as i expected

推荐答案

不考虑任何填充,滚动条等,并假设对于全屏显示来说这仅是 ,您将需要使用.您可以将and与您提供给更具体的目标设备(例如,高DPI)的查询结合起来.

Disregarding any padding, scrollbars, etc. and assuming this is only for full screen displays, you'll want to use @media (min-width: 5120px). You can combine this using and with the query you've provided to target devices more specifically (such as high-DPI).

5120px值可以(可能应该)降低,介于4k和5k显示的截止值之间.这将允许用户略微缩小浏览器,包括滚动条等等.

The 5120px value can (and likely should) be lowered, somewhere between the cutoff for a 4k and 5k display. This will allow the user to slightly shrink the browser, include a scrollbar, and more.

这篇关于iMac 5k分辨率的媒体查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-25 22:57