Skip to content

Instantly share code, notes, and snippets.

@LeaVerou
Created May 9, 2012 13:09
Show Gist options
  • Save LeaVerou/2644372 to your computer and use it in GitHub Desktop.
Save LeaVerou/2644372 to your computer and use it in GitHub Desktop.
Transitioning font-size and relative lengths
/**
* 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;
}
<div id="outer">
<div id="inner">
Hover this
</div>
</div>
{"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