简体   繁体   English

userContent.css和Internet Explorer 8或更高版本

[英]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. 我正在尝试使用“userContent.css”文件作为用户样式表,如Internet Explorer,工具,辅助功能选项中所指定。

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. 我发现尽管CSS样式可能出现在外部样式表中,HTML中的样式表块或HTML中的样式=“”内联使用,但它们似乎不适用于“辅助功能”选项下的用户指定样式表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". 这一切都始于我尝试使用“通用”或“通配符”来指定许多具有以“myID”开头的id的div。

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. 同样,这适用于内联,块或外部CSS文件样式,但不适用于工具,选项,辅助功能,用户样式表下的IE中引用的文件。

I've read plenty of documentation on CSS uses but I can't find anything for the accessibility file use of CSS styles. 我已经阅读了大量关于CSS使用的文档,但是我找不到任何关于CSS样式的可访问性文件的使用。

IE8 and lower does not understand CSS3 selectors like "contains selector" *= but it should work with higher version. IE8和更低版本不理解CSS3选择器,如“包含选择器” *=但它应该适用于更高版本。 It works as expected in IE11. 它在IE11中按预期工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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