css - 下拉菜单边框

标签 css wordpress wordpress-theming

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

#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;`

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

最佳答案

使用 :last-child 选择器。您的 CSS 如下所示:

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

希望对您有所帮助!

关于css - 下拉菜单边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12021210/

相关文章:

java - 如何从 h :message 中删除点( ListView )

html - 如何使用填充和加长 Bootstrap 搜索栏?

css - 如何仅使用 CSS 选择 n>4 个元素的第一个元素?

regex - 正则表达式长度 (0) 或 (7-50)

php - 如何自定义WordPress可视化编辑器HTML输出

jquery - 将 jquery 和自定义脚本添加到 WordPress 主题

html - 高分辨率图像 IE 浏览器渲染

jquery - (Wordpress) 图像到 Work 的附件但未出现在 slider 中

jquery - 如何在悬停时更改父 <li> 的样式

php - WordPress 帖子,按自定义表格结果排序