0

如何在二十一主题wordpress中为下拉菜单或父导航栏的子项获取底部圆角

#access ul ul a {
background: #F9F9F9;
border-bottom: 1px dotted #DDD;
 color: #444;
font-size: 13px;
font-weight: normal;
height: auto;
line-height: 1.4em;
padding: 10px 10px;
width: 168px;
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;`

如果我保持这样,那么所有下拉菜单项都会获得边框,我只为最后一项注册边框

4

1 回答 1

0

使用:last-child选择器。这是您的 CSS 的外观:

.menu-item:last-child a {
     border-bottom-right-radius: 10px;
     border-bottom-left-radius: 10px;
}

希望有帮助!

于 2012-08-18T18:35:47.400 回答