internet-explorer - CSS3 PIE 与 :first-child 冲突

标签 internet-explorer css css3pie css-selectors

我正在使用 CSS3 PIE为 IE8 及更早版本添加对 border-radius 的支持,它与 :first-child 选择器冲突。

基本上,我有三个列表项向左浮动。每个都有 10px 的左边距,除了第一个,我设置为 0:

#steps li {
    border-radius: 10px;
    float: left;
    margin-left: 10px;
}
#steps li:first-child {
    margin-left: 0;
}

当我将 PIE 应用于 #steps li 选择器以添加对 border-radius 的支持时,第一个列表项被重新绘制,左边距设置回 10px,就像 #步骤 li:first-child 选择器不存在。我可以判断这是由于 PIE 重绘了元素,因为它在正确的位置短暂闪烁,然后在一瞬间移动了超过 10px。

我已经尝试将 PIE 应用于两个选择器,但这并没有什么区别,而且我在 PIE 支持论坛上找不到与第一个 child 有关的任何内容。

最佳答案

查看官方论坛 CSS3 PIE Forums - IE :first/last-child overwritten

最后的结果是你需要添加

#steps css3-container:first-child + li, 
#steps li:first-child {
    margin-left: 0;
}

关于internet-explorer - CSS3 PIE 与 :first-child 冲突,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7651388/

相关文章:

internet-explorer - 如何强制ie要求数字证书

javascript - Internet Explorer 和 <select> 标签问题

javascript - 在 jQuery mousedown 处理程序中添加覆盖后,Internet Explorer 会泄漏单击事件

css - 将 Bootstrap 与 vue webapp : How to customise 一起使用

jquery-ui - 是否可以在全局范围内将 CSS3Pie 边框半径应用于 jQuery UI?

css - IE10 没有 Webkit 不工作

CSS 类和子类

javascript - 点击时改变图像,有mouseenter()方法和mouseleave()

html - Html5 css 布局和 jQuery UI 的 Css 重置选项

html - Internet Explorer 8 中的 Bootstrap 3 进度条问题