Menu
The user-select
property designates whether or not the text of an element can be selected.
By default, some browsers allow the user to select text by double-clicking on it. This property can override the default behavoir.
div.noselect {
user-select: none;
}
auto
Default value. As long as the browser allows it, text can be selected.
none
Text inside the element cannot be selected.
text
Text inside the element can be selected.
all
Instead of the default double-click text selection behavior, text is selected with a single click.
Have a code example of user-select
? Submit a codepen.io demo and we'll showcase it here ↴