1h1 { color: #666;display:inline-block; margin:0;text-transform:uppercase; }
2h1:after {
3 display:block;
4 content: '';
5 border-bottom: solid 3px #019fb6;
6 transform: scaleX(0);
7 transition: transform 250ms ease-in-out;
8}
9h1:hover:after { transform: scaleX(1); }
10h1.fromRight:after{ transform-origin:100% 50%; }
11h1.fromLeft:after{ transform-origin: 0% 50%; }
1EASY! Just use the code by Expensive Earthworm but just replace the
2h1 with the element you want the border-bottom to be animated and applied
3on.
4I KNOW THIS IS OBVIOUS BUT SOME ARE JUST GETTING STARTED
5SO YE