更改jQuery中元素的:after属性 [英] change element's :after property in jQuery
本文介绍了更改jQuery中元素的:after属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想基本上做到这一点.但这不起作用.
I want to basically do this. But it doesn't work.
$('.child_flyout:after').css({'top':'20px'});
在jQuery中有任何解决方法吗?
Any workaround to do this in jQuery?
推荐答案
也许只是我,但是我通常在CSS中定义psuedo元素并添加类.
Maybe It's just me, but I usually define the psuedo element in css and add the class.
.poptop:after {
top:20px;
}
$('.child_flyout').addClass('poptop');
这篇关于更改jQuery中元素的:after属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文