Skip to content

Instantly share code, notes, and snippets.

@onuproy
Created July 22, 2019 09:21
Show Gist options
  • Save onuproy/8094479d60b25a68f8dd540362f15d8e to your computer and use it in GitHub Desktop.
Save onuproy/8094479d60b25a68f8dd540362f15d8e to your computer and use it in GitHub Desktop.
CSS user-select Property
<!DOCTYPE html>
<html>
<head>
<style>
div {
-webkit-user-select: none; /* Safari 3.1+ */
-moz-user-select: none; /* Firefox 2+ */
-ms-user-select: none; /* IE 10+ */
user-select: none; /* Standard syntax */
}
</style>
</head>
<body>
<h1>The user-select Property</h1>
<div>The text of this div element cannot be selected. If you double-click me, my text will not be highlighted.</div>
</body>
</html>
@onuproy
Copy link
Author

onuproy commented Jul 22, 2019

very helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment