当前位置: 动力学知识库 > 问答 > 编程问答 >

html - -ms-high-contrast css media selector in other browsers

问题描述:

The style of my web app is for the most part directed at users who can operate a mouse. Some focusable elements don't look so good when focused (clicked on) so these elements have custom or no outlining. Some inputs are bootstrap inputs so their focus is dictated by bootstrap.

When a user is visually disabled (not totally blind but has trouble to see) I would like to emphasize the focused elements. Usually these users have some sort of high contrast on and this can be detected in IE:

@media screen and (-ms-high-contrast: active) {

/* All high contrast styling rules */

*:focus {

/*outline-color: red !important;*/

outline-width: 5px !important;

outline-style: solid !important;

}

}

How would I go about implementing this in other browsers and would this be supported on other operating systems?

Maybe we can give the user an option for a different theme of the site but I'd rather have this automatically done based on the user's settings in the Operating System.

分享给朋友:
您可能感兴趣的文章:
随机阅读: