CSS3 PIE 与 :first-child 冲突
我正在使用 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,就好像 #steps li:first-child
选择器不存在一样。我可以看出这是由于 PIE 重绘了元素,因为它在正确的位置短暂闪烁,然后瞬间移动了 10 像素以上。
我尝试过将 PIE 应用于两个选择器,但这并没有什么区别,而且我无法在 PIE 支持论坛上找到与第一个子级相关的任何内容。
I'm using CSS3 PIE to add suppport for border-radius to IE8 and earlier, and it's conflicting with a :first-child selector.
Basically, I have three list items floated left. Each one has a left margin of 10px, except for the first one, which I set to 0:
#steps li { border-radius: 10px; float: left; margin-left: 10px; } #steps li:first-child { margin-left: 0; }
When I apply PIE to the #steps li
selector to add support for border-radius, the first list item is redrawn with the left margin set back to 10px, as if the #steps li:first-child
selector isn't there. I can tell it's due to PIE redrawing the element, because it briefly flashes in the correct position and then shifts over 10px a split second later.
I've tried applying PIE to both selectors, but that doesn't make a difference, and I'm unable to find anything pertaining to first-child on the PIE support forums.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看官方论坛 CSS3 PIE 论坛 - IE :first/ last-child overwriting
最终的结果是你需要添加
Have a look at the official forum over at CSS3 PIE Forums - IE :first/last-child overwritten
The end result is that you need to add