js-动态修改伪元素样式

 document.styleSheets[0].addRule('#' + node.key + '::after', 'height:' + fileNameDom.clientHeight + 'px !important'); // 设置伪元素样式

document.styleSheets[0].addRule('.className'或‘#ID’ +‘::after’,css样式字符串拼接).

posted @ 2020-07-06 17:33  面包_girl  阅读(2378)  评论(0编辑  收藏  举报
/* 鼠标点击文字特效 */