11

Is there a way to ease-in-out between 2 border thicknesses?

My code:

nav a {
border-bottom: 1px solid #AADA4B;
}


nav a:hover {
border-bottom: 3px solid #AADA4B;
}

Thanks very much for the help. Sam.

4

1 回答 1

18

Sure, just transition border or border-width on the a element:

nav a {
/* -moz-, -o-, -webkit- prefixes omitted for brevity */
transition: border-width 0.1s ease-in-out;
border-bottom: 1px solid #AADA4B;
}
于 2013-03-12T19:07:48.487 回答