问题
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 */
}
I also want only 5K resolution will effects, moreover in 4k display resolution its showing as i expected
回答1:
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).
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.
回答2:
This will only apply styles to screens 5120px and wider:
@media(min-width: 5120px){
  // codez
}
回答3:
Try this:
Since the iMac 4k width is 4096px and iMac 5k width is 5120px. This media query will work between those resolution
@media only screen and (min-width : 4095px) and (max-width : 5120px) {
}
回答4:
Some of my projects I used this media query and its works perfect for me !
@media screen and (min-width: 2400px) {
    height: 650px;
}
来源:https://stackoverflow.com/questions/51022979/media-query-for-imac-5k-resolution