Created
May 9, 2012 13:09
-
-
Save LeaVerou/2644372 to your computer and use it in GitHub Desktop.
Transitioning font-size and relative lengths
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
/** | |
* Transitioning font-size and relative lengths | |
* See: http://lists.w3.org/Archives/Public/www-style/2011Nov/0016.html | |
*/ | |
#inner, #outer { | |
transition: 3s font-size, 1s width; | |
} | |
#outer { | |
font-size: 20px; | |
white-space: nowrap; | |
} | |
#outer:hover { | |
font-size: 50px; | |
} | |
#inner { | |
width: 5em; | |
background-color: orange; | |
} | |
#inner:hover { | |
width: 10em; | |
} |
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
<div id="outer"> | |
<div id="inner"> | |
Hover this | |
</div> | |
</div> |
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":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment