Last active
April 26, 2019 21:25
-
-
Save cyancey76/198579017067e4b5c7dce2e52e185cb8 to your computer and use it in GitHub Desktop.
CSS fade out sibling elements
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
| .parent-element { | |
| pointer-events: none; | |
| } | |
| .parent-element > * { | |
| pointer-events: auto; | |
| transition: 300ms opacity, 300ms transform; | |
| } | |
| .parent-element:hover > .sibling-elements, | |
| .parent-element:focus-within > .sibling-elements { | |
| opacity: 0.25; | |
| } | |
| .parent-element:hover > .sibling-elements:hover, | |
| .parent-element:focus-within > :focus { | |
| opacity: 1; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment