(0) exportieren Drucken
Alle erweitern
EN
Dieser Inhalt ist in Ihrer Sprache leider nicht verfügbar. Im Folgenden finden Sie die englische Version.

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

TopicDescription

aspect-ratio media feature

Defined as the ratio of value of the width media feature to the value of the height media feature.

color media feature

Describes the number of bits per color component of the output device.

color-index media feature

Describes the number of entries in the color lookup table of the output device.

device-aspect-ratio media feature

Defined as the ratio of value of the device-width media feature to the value of the device-height media feature.

device-height media feature

Describes the height of the rendering surface of the output device.

device-width media feature

Describes the width of the rendering surface of the output device.

height media feature

Describes the height of the targeted display area of the output device.

monochrome media feature

Describes the number of bits per pixel in a monochrome frame buffer.

-ms-high-contrast media feature

Describes whether the application is being displayed in high contrast mode, and with what color variation.

-ms-view-state media feature

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.

orientation media feature

Describes whether the orientation of the targeted display area of the output device is portrait or landscape.

resolution media feature

Describes the resolution of the output device—that is, the density of the pixels.

width media feature

Describes the width of the targeted display area of the output device.

 

ObjectDescription

StyleMedia

Specifies the media type of the object that is used to view the document object.

 

Related topics

Media Query Listeners

 

 

Microsoft führt eine Onlineumfrage durch, um Ihre Meinung zur MSDN-Website zu erfahren. Wenn Sie sich zur Teilnahme entscheiden, wird Ihnen die Onlineumfrage angezeigt, sobald Sie die MSDN-Website verlassen.

Möchten Sie an der Umfrage teilnehmen?
Anzeigen:
© 2014 Microsoft