我想知道如何使用 CSS/JS 使选择文本时的高亮部分具有边框半径,类似于 Sublime Text 中的做法。 .
最佳答案
我不认为有办法做你想做的事: 来自 MDN :
Only a small subset of CSS properties can be used in a rule using ::selection in its selector: color, background, background-color and text-shadow. Note that, in particular, background-image is ignored, like any other property.
关于javascript - 在突出显示文本时,突出显示接收边框半径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22085507/