我试图在我的菜单上使用border-right实现分隔符效果。 这里是我的css代码伪类上一个孩子
ul.navigation li a {
text-decoration:none;
float:left;
width:252px;
height:50px;
display:block;
background-color:#ccc;
text-align:center;
line-height:45px;
color:#000;
position:relative;
border-right:1px solid #333;
}
ul.navigation li a:last-child {
border:none;
}
我在做什么错了?我也试过border-left
和:first-child
。
你似乎很困惑在这里。你在标题中说最后一个孩子,但是在你的代码中使用':first-child',并且用所有CSS版本标记你的问题... – BoltClock 2013-02-16 16:49:04
哪些浏览器?不是每个浏览器都支持':first-child'。 – 2013-02-16 16:49:13
@BoltClock我需要和你谈谈,你可以让我聊天吗? – 2013-02-16 16:51:21