Skip to content

Instantly share code, notes, and snippets.

@PaulloClara
Created July 21, 2020 14:47
Show Gist options
  • Save PaulloClara/9f7bd0b3c25579c5059788665a2a543d to your computer and use it in GitHub Desktop.
Save PaulloClara/9f7bd0b3c25579c5059788665a2a543d to your computer and use it in GitHub Desktop.
simple example of using pointer events in css.
<main>
<div></div>
<div></div>
</main>
main {
pointer-events: none;
}
main > div {
width: 20px;
height: 20px;
background: #000;
}
main > div:first-child {
margin-bottom: 2px;
pointer-events: none;
}
main > div:last-child {
pointer-events: auto;
}
main:hover > div:first-child {
background: #f00;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment