1#sec {
2 display: inline-block;
3 position: relative;
4 padding-bottom: 3px;
5}
6#sec:after {
7 content: '';
8 display: block;
9 margin: auto;
10 height: 3px;
11 width: 0px;
12 background: transparent;
13 transition: width .5s ease, background-color .5s ease;
14}
15#sec:hover:after {
16 width: 100%;
17 background: blue;
18}