Created
January 21, 2012 16:04
-
-
Save geoffreycrofte/1653161 to your computer and use it in GitHub Desktop.
Animation in pseudo-element
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
/** | |
* Animation in pseudo-element | |
*/ | |
div { | |
height: 100px; | |
background: #eee; | |
} | |
div:before { | |
content:" "; | |
display:inline-block; | |
width: 200px; height: 100px; | |
background: #fff; | |
vertical-align: middle; | |
transition: width 1s; | |
} | |
div:hover:before { | |
width: 240px; | |
} |
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>Hello World!</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","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment