如何使HTML文本无法选择[重复] - How to make HTML Text unselectable [duplicate]

问题:

This question already has an answer here: 这个问题在这里已有答案:

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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章