Browser compatibility issues: IE9 user-select compatible

Posted Jun 28, 20201 min read

user-select has two values:

none:users cannot select text

text:the user can select the text

It should be noted that user-select is not a W3C CSS standard attribute, browser support is incomplete, and needs to be adjusted for each browser


    -moz-user-select:none; /*Firefox Fox*/

    -webkit-user-select:none; /*webkit browser*/

    -ms-user-select:none; /*IE10*/

    -khtml-user-select:none; /*early browser*/

    -o-user-select:none; /*opera browser*/



IE6-9 has not found related CSS properties, but you can add onselectStart on the text label

<div onselectstart="return false;" >You can t select me</div>

Related Posts