Skip to content

Instantly share code, notes, and snippets.

@JosephSilber
Created November 18, 2012 20:12
Show Gist options
  • Save JosephSilber/4107179 to your computer and use it in GitHub Desktop.
Save JosephSilber/4107179 to your computer and use it in GitHub Desktop.
Relatively-position elements only fire events where they're actually painted
/**
* Relatively-position elements only fire events where they're actually painted
*/
body {
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
}
.relative {
width: 100px;
height: 100px;
position: relative;
left: 300px;
background: #00f2ff;
}
.relative:hover {
background: #00b5bf;
}
<div class="relative"></div>
{"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