Media Queries
This section describes Cascading Style Sheets (CSS) features related to media queries. A media query consists of a media type and zero or more expressions that check for the conditions of particular media features, such as width, height, and color. A media query is either true or false. It is considered true if the media type of the media query matches the media type of the user's device, and if all expressions in the media query are true.
Media queries were introduced in Windows Internet Explorer 9 and require that your document be in IE9 Standards mode. For more information about standards modes, see Defining Document Compatibility.
Media queries are defined in the World Wide Web Consortium (W3C) Media Queries specification.
In this section
| Topic | Description |
|---|---|
|
Defined as the ratio of value of the width media feature to the value of the height media feature. | |
|
Describes the number of bits per color component of the output device. | |
|
Describes the number of entries in the color lookup table of the output device. | |
|
Defined as the ratio of value of the device-width media feature to the value of the device-height media feature. | |
|
Describes the height of the rendering surface of the output device. | |
|
Describes the width of the rendering surface of the output device. | |
|
Describes the height of the targeted display area of the output device. | |
|
Describes the ability of a user to hover over elements on a page. | |
|
Describes the number of bits per pixel in a monochrome frame buffer. | |
|
Describes whether the application is being displayed in high contrast mode, and with what color variation. | |
|
This feature is deprecated as of Internet Explorer 11 and Windows 8.1 and should no longer be used. Use max-width and min-width instead. | |
|
Describes whether the orientation of the targeted display area of the output device is portrait or landscape. | |
|
Describes the existence and accuracy of a pointing device like a stylus or a mouse. | |
|
Describes the resolution of the output device—that is, the density of the pixels. | |
|
Describes the resolution in physical pixels per CSS pixel. | |
|
Describes the width of the targeted display area of the output device. |
| Object | Description |
|---|---|
|
Specifies the media type of the object that is used to view the document object. |
Related topics