Last active
January 2, 2016 10:29
-
-
Save mediamichael/8290745 to your computer and use it in GitHub Desktop.
Disable Dragging and Selecting CSS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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