与 html.anon 相反的类是什么?
也就是说,我想在 CSS 中对所有已登录用户使用 display: none。
谢谢帮助。
与 html.anon 相反的类是什么?
也就是说,我想在 CSS 中对所有已登录用户使用 display: none。
谢谢帮助。
您可以使用 :not() - CSS:层叠样式表 | MDN
谢谢,我可能一直在找它,但我无法做到。
我尝试了
html :not.anon .d-header-icons {
display: none;
}
:not html.anon .d-header-icons {
display: none;
}
好的,看起来这样可以:
html:not(.anon) .d-header-icons {
display: none;
}