简体   繁体   中英

userContent.css and Internet Explorer 8 or higher

I am trying to use the "userContent.css" file as a User Style Sheet, as specified in Internet Explorer, Tools, Accessibility option.

I have found that although CSS styles as they may appear in an external style sheet, style sheet block in HTML, or inline use of style="" in HTML, they do not seem to work in a User specified style sheet under the Accessibility option of IE.

Below is an example:

#myID, .myClass { color: blue !important} 
/* this works for id's and classes in the userContent.css file */

[id="myID"] { color: blue !important}
/* this fails for a User specified style sheet (userContent.css) */
/* but works as inline, block or in an external style sheet */

This all started in my attempt to use a "universal" or "wildcard" to specify many div's with an id that started with "myID".

What I want to do is this:

div[id*="myID"] {color:blue !important}

Again, this works with inline, block or external CSS file style, but not in a file referenced in IE under Tools, Options, Accessibility, User Style Sheet.

I've read plenty of documentation on CSS uses but I can't find anything for the accessibility file use of CSS styles.

IE8 and lower does not understand CSS3 selectors like "contains selector" *= but it should work with higher version. It works as expected in IE11.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM