Disable Text Selection with CSS

This snippet disables text selection on all browsers.

/* Switch body to anything else to apply it to only elements matching the criteria (e.g. #noselect or .noselect) */

body {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}