EN
Este conteúdo não está disponível em seu idioma, mas aqui está a versão em inglês.

-ms-high-contrast media feature

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

Possible values

  • Value:active | black-on-white | white-on-black | none
  • Applies to: bitmap media types
  • Accepts min/max prefixes: no

One of the following values.

ValueDescription

active

Indicates that the subsequent styling rules will be applied when the system is placed in high contrast mode with any color variation.

black-on-white

Indicates that the subsequent styling rules will be applied when the system is placed in high contrast mode with a black-on-white color variation.

white-on-black

Indicates that the subsequent styling rules will be applied when the system is placed in high contrast mode with a white-on-black color variation.

none

Indicates that the subsequent styling rules will be applied when the system is not in high contrast mode.

 

Remarks

The -ms-high-contrast media feature works with the -ms-high-contrast-adjust property.

The -ms-high-contrast media feature was introduced in Windows 8.

Examples

The following declarations will match applications that are being displayed in high contrast mode with any color variation, a black-on-white color variation, and a white-on-black color variation, respectively.


@media screen and (-ms-high-contrast: active) {
  /* All high contrast styling rules */
}
@media screen and (-ms-high-contrast: black-on-white) {
  div { background-image: url('image-bw.png'); }
}
@media screen and (-ms-high-contrast: white-on-black) {
  div { background-image: url('image-wb.png'); }
}

Related topics

-ms-high-contrast-adjust

 

 

Mostrar:
© 2014 Microsoft