Created
July 5, 2019 18:11
-
-
Save LeaVerou/9fb853efc0ab40812ece9c46a9ee262c to your computer and use it in GitHub Desktop.
Different transition on reverse
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
/** | |
* Different transition on reverse | |
*/ | |
p { | |
width: 200px; height: 200px; | |
background: yellow; | |
transition: 1s; | |
} | |
p:hover { | |
background: yellowgreen; | |
transition-duration: 0s; | |
} | |
p + p { transition-duration: 0s } | |
p + p:hover { transition-duration: 1s } |
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>On hover, no transition, on mouse out, 1s | |
<p>On hover, 1s, on mouse out, no transition |
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-vertical","fontsize":"100","seethrough":"","prefixfree":"","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment