我想在 :target 元素上使用 :after 来选择 css 中的元素。我试过这段代码,但它不起作用。
.myclass a:target:after{}
我该怎么做?
最佳答案
:target
是一个伪类
:after
是一个伪元素。
Pseudo-classes are allowed anywhere in selectors while pseudo-elements may only be appended after the last simple selector of the selector.
关于html - 两个css伪类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17460824/