css - Internet Explorer 6 (urgh) 和 CSS - 将多个类应用于样式

标签 css internet-explorer

我想知道 Internet Explorer 6 对以下内容的解释有多好:

p img.blue, p img.red {
  border:(purple) 1px solid; /* (Please ignore any style errors) */
}

我感兴趣的是将多个类应用于同一样式。我知道 IE6 无法正确解释以下内容:

p img.blue.red {
  border:(purple) 1px solid; /* (Please ignore any style errors) */
}

有人知道吗?此致和 TIA。

//编辑:

请注意,我正在查询第一段代码。

最佳答案

IE 解释

p img.blue, p img.red {/* */}

正确地,通过将​​包含的样式应用到 class="blue"的 img 元素(p 元素的子元素), img 元素(class="red"的 p 元素的子元素)。

IE 不理解 p img.blue.red,它只会将样式应用到 p img.red

关于css - Internet Explorer 6 (urgh) 和 CSS - 将多个类应用于样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1243601/

相关文章:

javascript - CSS 转换不适用于 jQuery 的 .toggleClass()

javascript - 根据条件是否 react 更改文本颜色

html - 在图像上垂直和水平居中文本

Angular 6 应用程序无法在 IE < 11 中运行

javascript - selection.modify() 是否有 IE 替代品?

CSS:保持宽高比而不溢出内容

javascript - 无法避免一个 div 踩到另一个 div

javascript - 使用 window.open() 在 IE 上被拒绝权限?

javascript - CSS 背景颜色未按预期运行

internet-explorer - Internet Explorer 中的 Go 和 gorilla session