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