Created
April 20, 2012 13:38
-
-
Save gentle-media/2428633 to your computer and use it in GitHub Desktop.
The first commented line is your dabblet’s title
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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
/* The large delay prevents the color from changing */ | |
p.perm { | |
transition: color 0s 9999999s; | |
} | |
/* When a button is pressed, overwrite the transition property | |
to remove the delay, so that we can instantly change the color */ | |
a.red:hover ~ p.perm, a.green:hover ~ p.perm, a.blue:hover ~ p.perm { | |
transition: color 0s 2s; | |
} | |
a.red:hover ~ p { | |
color: red; | |
} | |
a.green:hover ~ p { | |
color: green; | |
} | |
a.blue:hover ~ p { | |
color: blue; | |
} |
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
<a href="#" class="red">Red</a> | |
<a href="#" class="green">Green</a> | |
<a href="#" class="blue">Blue<a> | |
<p> | |
This text will only have the color while the button is pressed down. | |
</p> | |
<p class="perm"> | |
This text will keep the given color even after the button is released. | |
<p> |
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","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment