Created
May 7, 2013 20:58
-
-
Save benknight/5536064 to your computer and use it in GitHub Desktop.
When mouseup and mousedown occur on different target elements, nothing happens. Therefore, it's probably a bad idea to "depress" buttons down 1px on click. Doesn't matter if you use CSS transform or position.
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
/** | |
* When mouseup and mousedown occur on different target elements, nothing happens. | |
*/ | |
a { display: block; } | |
a:active { | |
transform: translateY(100px); | |
} |
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
<p><a href="http://google.com">Blah blah</a></p> |
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
// alert('Hello world!'); |
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
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment