我在 wordpress 中为侧边栏类别编写了背景图像和颜色。
我为类别的子菜单设置了背景图片
.sub-menu li.menu-item-object-category {
background: url("http://www.example.com/dev/123/wp-content/uploads/2014/04/list_style.png") no-repeat scroll left center transparent;
}
这里我将事件的当前菜单项高亮颜色设置为背景色
.menu-item-object-category.current-menu-item {
background: none repeat scroll 0% 0% rgb(234, 234, 234);
}
这里不支持同时删除背景图片表示激活背景色,删除背景色表示激活背景色。我想同时激活两者。
帮助解决这个问题。
最佳答案
如果我没理解错的话,您是在用颜色覆盖背景图像,反之亦然。
改为尝试:
.sub-menu li.menu-item-object-category {
background-image: url("http://www.example.com/dev/123/wp-content/uploads/2014/04/list_style.png") no-repeat scroll left center transparent;
}
.menu-item-object-category.current-menu-item {
background-color: none repeat scroll 0% 0% rgb(234, 234, 234);
}
关于html - wordpress 不支持当前菜单背景颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23532686/