css - 为什么这个li :last-child not work?

标签 css wordpress css-selectors

我的 CSS 规则:

#menu-right li:last-child a, #menu-left li:last-child a, #menu-bottom li:last-child a, {
    border: none;
}

一些更改后停止工作,谁能告诉我为什么?测试网站已[删除]

谢谢!

最佳答案

您的规则有误。 {:

前不应有 ,(逗号)

替换:

#menu-bottom li:last-child a, {

与:

#menu-bottom li:last-child a {

另请注意,:last-child 选择器不适用于 Internet Explorer 6、7 和 8!

关于css - 为什么这个li :last-child not work?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12286790/

相关文章:

HTML float : left div same sizes not working

html - CSS3 透明边框覆盖其下所有元素层

CSS 第一个子元素匹配,不匹配任何子元素

jquery - 用 jquery 单击事件替换 CSS3 悬停过渡

html - 奇怪的CSS换行符

javascript - 如何在用户选择特定变体时为弹出窗口添加链接

wordpress - Woocommerce 设置购物车到期间隔

WordPress 获取最近的帖子并显示标题和类别名称

css - 为什么.foo a :link, .foo a :visited {} selector override a:hover, a :active {} selector in CSS?

jquery - 为什么 $ ("#RadioButtons:checked").val() 在 IE 中不起作用?