how to select :after element using jquery

前端 未结 4 1169
名媛妹妹
名媛妹妹 2020-12-16 15:25

Bellow is my codes.what i have tried.when this popup appear i want to use this close button to close entire popbox.

CSS code

.bigdiv{
    display:non         


        
4条回答
  •  清歌不尽
    2020-12-16 16:02

    You can use the getComputedStyle function, which is supported by most major browsers - IE9,IE10,Chrome,FF. I have not found a way to do this in IE8 though.

    var attrContent = getComputedStyle(this,':after').content;
    var attrWidth = getComputedStyle(this,':after').width;
    

    If you find this function is undefined try window.getComputedStyle instead.

提交回复
热议问题