我的CSS规则:为什么这个李:最后孩子不工作?
#menu-right li:last-child a, #menu-left li:last-child a, #menu-bottom li:last-child a, {
border: none;
}
停止一些变化后的工作,谁能告诉我为什么? testwebsite [已删除]
谢谢!
我的CSS规则:为什么这个李:最后孩子不工作?
#menu-right li:last-child a, #menu-left li:last-child a, #menu-bottom li:last-child a, {
border: none;
}
停止一些变化后的工作,谁能告诉我为什么? testwebsite [已删除]
谢谢!
您的规则有误。不应该有在{
前,
(逗号):
替换:
#menu-bottom li:last-child a, {
有了:
#menu-bottom li:last-child a {
还要注意的是,:last-child
选择不使用Internet Explorer 6的工作, 7和8!
':last-child'伪类仍然无法在浏览器中可靠地使用。尤其是,Internet Explorer版本<9,Safari <3.2肯定[不支持它](https://developer.mozilla.org/en/CSS/:last-child#Browser_compatibility),尽管Internet Explorer 7和Safari 3.2 *好奇地支持':first-child'。 –
Arrrgh。谢谢!那么我会转向第一个孩子。 –
有同样的问题哥们,最后都变成了'第一胎'。 :) –
将#menu-bottom li:last-child a, {
替换为#menu-bottom li:last-child a {
。你的规则中有一个逗号,正在打破它。
就是这样。谢谢! –
很难找到您在该页面上讨论的元素。你可以使用http://jsfiddle.net创建一个例子吗? (不需要JS)。 –