问题:
This question already has an answer here: 这个问题在这里已有答案:
- How to disable text selection highlighting 41 answers 如何禁用文本选择突出显示 41个答案
I would like to add text to my webpage as a label and make it unselectable. 我想在我的网页上添加文字作为标签并使其无法选择。
In other words, When the mouse cursor is over the text I would like it to not turn into a text selecting cursor at all. 换句话说,当鼠标光标在文本上方时,我希望它根本不会变成文本选择光标。
A good example of what I'm trying to achieve is the buttons on this website (Questions,Tags,Users,...) 我想要实现的一个很好的例子就是这个网站上的按钮(问题,标签,用户......)
解决方案:
参考一: https://en.stackoom.com/question/9h7u参考二: https://stackoom.com/question/9h7u