Skip to content

Instantly share code, notes, and snippets.

@mediamichael
Last active January 2, 2016 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mediamichael/8290745 to your computer and use it in GitHub Desktop.
Save mediamichael/8290745 to your computer and use it in GitHub Desktop.
Disable Dragging and Selecting CSS
.img{
user-drag: none;
-webkit-user-drag: none;
-webkit-touch-callout: none;
-moz-user-select: none;
-khtml-user-select: none;
user-select: none;
}
/* click through it */
.elem {
pointer-events:none;
}
/* restore pointer events to a child elem */
.child {
pointer-events: auto;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment