Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Animation in pseudo-element
* Animation in pseudo-element
div {
height: 100px;
background: #eee;
div:before {
content:" ";
width: 200px; height: 100px;
background: #fff;
vertical-align: middle;
transition: width 1s;
div:hover:before {
width: 240px;
<div>Hello World!</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.