Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: 从 JavaScript 设置 CSS 伪类规则
你如何做等同于:
::selection { color: #FFF; }
在javascript中?
.foobar::selection { color: #FFF; }
element.className += " foobar";