Skip to content

Instantly share code, notes, and snippets.

@benknight
Created May 7, 2013 20:58
Show Gist options
  • Save benknight/5536064 to your computer and use it in GitHub Desktop.
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.
/**
* When mouseup and mousedown occur on different target elements, nothing happens.
*/
a { display: block; }
a:active {
transform: translateY(100px);
}
<p><a href="http://google.com">Blah blah</a></p>
// alert('Hello world!');
{"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