css

Disable text selection highlighting using CSS

The user-select property can be used to disable text highlighting on certain elements. This is helpful if you want to prevent the user from accidently highlighting an element like a dropdown menu.

.no-selection-highlight {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

more CSS posts