本文介绍了如何解决方法:IE6不支持CSS“属性”选择器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用的项目之一使用CSSattributeselector [att]

One of the projects which I am working uses CSS "attribute" selector [att]

ie6不支持
支持IE6中的CSS选择器(查找文本属性选择器)

which is not supported by ie6:Support for CSS selectors in IE6 (look for text "Attribute Selectors")

有没有任何解决方法/ hack是有效的html / css来克服这个问题?

Is there any workaround/hack which is of course valid html/css to overcome this problem?

推荐答案

由于IE6本质上限于:

Since IE6 is essentially limited to:



  • ID选择器

  • (空格)后代选择器

  • >
  • class selectors
  • ID selectors
  • (space) descendant selectors
  • a:-only pseudo-selectors

您唯一的选项是:



  • 使用JavaScript(强烈不推荐,除非在高度专业的情况下)

  • Use more classes to identify your elements
  • Use JavaScript (strongly not recommended except in highly specialized cases)

我发现通过用一个空格分隔多个类来分配多个类是非常有帮助的: class =foo bar

I find it very helpful to take advantage of the ability to assign multiple classes to an element by separating them with a space: class="foo bar"

这篇关于如何解决方法:IE6不支持CSS“属性”选择器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-04 07:30
查看更多