How to make certain text not selectable with CSS
This question already has an answer here:
The CSS below stops users from being able to select text.
-webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+/Edge */
user-select: none; /* Standard */
To target IE9 downwards the html attribute unselectable
must be used instead:
<p unselectable="on">Test Text</p>
Use a simple background image for the textarea suffice.
Or
<div onselectstart="return false">your text</div>
链接地址: http://www.djcxy.com/p/7114.html
上一篇: 使文字不可选
下一篇: 如何使某些文本不能用CSS选择