<分区>
标签 javascript jquery css
<分区>
如何选择 this
的伪类 :after
?
我试试
$( this ).find( ':after' ).css("display","block");
但是没用!
最佳答案
在 jQuery 中无法直接选择伪类,因为它不是 DOM 的一部分
您可以附加 <style>
虽然:
$('head').append('<style>element:before{ /* apply styles here */ }</style>');
关于javascript - 选择伪类:after,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23971101/