问题描述
我正在尝试设置 woocomerce 小部件的样式,其中选定的类别或子类别在选择(活动/当前)时突出显示(连同计数链接)。
我尝试了很多,但有一个我无法弄清楚的技巧。
这是页面:https://allb.cloudaccess.host/right-sidebar/
解决方法
当您使用浏览器的开发人员工具检查类别时,您可以看到活动类别将 current-cat
类添加到 div。
现在您可以设置样式:
.current-cat{
//Styles for the div here
a{
//Styles for the link here
}
}