html - How to animate border-top effect -


when hover on "login,sign up" acorns website (https://www.acorns.com/) can see animation going along. have li

.navbar  li{     display: inline-block;    border-width:5px;        border-top-style:solid;    border-top-color: white;  }  .navbar li:hover, .navbar li:active{    border-width:4px;        border-top-style:solid;    border-top-color: #e0b82b;} 

how possible make border-top animated ? shown above. thank you.

http://jsfiddle.net/9mfccz6w/ i'm trying animate top bar (yellow)

you can add css tranistions .navbar li style. try code:

.navbar  li{    display: inline-block;    border-width:5px;        border-top-style:solid;    border-top-color: white;    -webkit-transition: 0.5s ease;                      -moz-transition: 0.5s ease;                     -o-transition: 0.5s ease;       -ms-transition: 0.5s ease;              transition: 0.5s ease; } 

jsfiddle


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -