Created
October 6, 2012 18:47
-
-
Save DeviaVir/3845768 to your computer and use it in GitHub Desktop.
Playing with pointer-events
This file contains hidden or 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
/** | |
* Playing with pointer-events | |
*/ | |
html, body { | |
background: #f4f4f4; | |
} | |
.form { | |
width: auto; | |
height: auto; | |
position: relative; | |
margin: 100px 50px 25px | |
} | |
input { | |
padding: 15px 20px; | |
width: 100%; | |
box-sizing: border-box; | |
border: 1px solid #ccc; | |
box-shadow: 0 0 20px -5px rgba(0,0,0,.3); | |
font-size: 20px; | |
} | |
span { | |
position: absolute; | |
right: 15px; | |
top: 18px; | |
padding: 10px; | |
border-radius: 50%; | |
background: #555; | |
/* Have clicks go to the input */ | |
pointer-events: none; | |
/* But show a cursor when hovering (not a text cursor) */ | |
cursor: pointer; | |
} |
This file contains hidden or 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
<!-- content to be placed inside <body>…</body> --> | |
<div class=form> | |
<input type=text /> | |
<span class=color></span> | |
</form> |
This file contains hidden or 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
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment