值
描述
width
规定目标显示区域的宽度。
可使用 "min-" 和 "max-" 前缀。
例子:media="screen and (min-width:500px)"
height
规定目标显示区域的高度。
可使用 "min-" 和 "max-" 前缀。
例子:media="screen and (max-height:700px)"
device-width
规定目标显示器/纸张的宽度。
可使用 "min-" 和 "max-" 前缀。
例子:media="screen and (device-width:500px)"
device-height
规定目标显示器/纸张的高度。
可使用 "min-" 和 "max-" 前缀。
例子:media="screen and (device-height:500px)"
orientation
规定目标显示器/纸张的取向。
可能的值:"portrait" 或 "landscape"
例子:media="all and (orientation: landscape)"
aspect-ratio
规定目标显示区域的宽度/高度比。
可使用 "min-" 和 "max-" 前缀。
例子:media="screen and (aspect-ratio:16/9)"
device-aspect-ratio
规定目标显示器/纸张的 device-width/device-height 比率。
可使用 "min-" 和 "max-" 前缀。
例子:media="screen and (aspect-ratio:16/9)"
color
规定目标显示器的 bits per color。
可使用 "min-" 和 "max-" 前缀。
例子:media="screen and (color:3)"
color-index
规定目标显示器能够处理的颜色数。
可使用 "min-" 和 "max-" 前缀。
例子:media="screen and (min-color-index:256)"
monochrome
规定在单色帧缓冲中的每像素比特。
可使用 "min-" 和 "max-" 前缀。
例子:media="screen and (monochrome:2)"
resolution
规定目标显示器/纸张的像素密度 (dpi or dpcm)。
可使用 "min-" 和 "max-" 前缀。
例子:media="print and (resolution:300dpi)"
scan
规定 tv 显示器的扫描方法。
可能的值是:"progressive" 和 "interlace"。
例子:media="tv and (scan:interlace)"
grid
规定输出设备是网格还是位图。
可能的值:"1" 代表网格,"0" 是其他。
例子:media="handheld and (grid:1)"