如题所述
不可以。
首先伪元素(pseudo-element)应该是CSS相关的概念。
现有的浏览器支持或尚未支持的伪元素如下:
::after
::before
::first-letter
::first-line
::selection
::backdrop
::placeholder
::marker
::spelling-error
::grammar-error
在CSS中控制伪元素使用 selector::pseudo-element,比如给div添加 ::after
content : 'x';
font-size : 14px;
color : red;
}
所以你通过JS生成的HTML,在CSS中定义就好。
温馨提示:答案为网友推荐,仅供参考