This is because out of nothing one hover action results in a border with gradient css animation effects. How to animate background-color of an element on mouse hover using CSS Topic: HTML / CSS Prev|Next Answer: Use the CSS3 transition property You can use the CSS3 transition property to smoothly animate the background-color of an element on mouseover, such as a hyperlink or a button. Save the coordinates in CSS variables Yes, only 9 lin e s of code to let your CSS know where the user positions his mouse. About Hover.css All Hover.css effects make use of a single element (with the help of some pseudo-elements where necessary), are self contained so you can easily copy and paste them, and come in CSS, Sass, and LESS flavours. How to create Animated gradient buttons on hover HTML and CSS in simple video tutorials https://www.youtube.com/watch?v=0sPH5fRqYuI HTML