首页 > js如何修改用户选中文本的样式?
就是css中的::selection
可以试一下用document.styleSheets[n]的addRule方法,在样式表的末尾中新添加一条::selection把之前的覆盖掉。