浏览器是否支持组合类型,ID和类选择器?

问题描述

| 类型选择器与文档语言元素类型的名称匹配。类型选择器匹配文档树中元素类型的每个实例。例如:
/* The following rule matches all H1 elements 
   in the document tree:  */
h1 { font-family: sans-serif; }
ID选择器根据元素实例的唯一标识符匹配元素实例。
/* The following rule matches the element whose 
   ID attribute has the value \"header\":  */
#header { text-align: center; }
类选择器匹配
/* The following rule matches all elements 
   with class \"money\":  */
.money { color: green; }
选择器可以在CSS中组合:
h1#chapter1 { font-size: 32px; text-align: center }

p#chapter1.intro { text-align: left }

p.ending { font-style: italic; }

#login.disabled { color: #f00; }
我的问题是,组合类型,ID和类选择器对浏览器的支持(IE6及更高版本)是什么?     

解决方法

当今使用的每个浏览器都支持所有给定的选择器组合。包括IE6 +。 IE6唯一无法解析的是组合的类选择器:
.class1.class2
它被读为链中最后一个类(在这种情况下为ѭ5),从而使它至少与最后一个类匹配任何元素。可以在其他答案中找到插图。     ,这个问题的答案: 将类别选择器与ID组合 ...似乎表明#id.class在IE6中不起作用