750 B
750 B
title, tags, expertise, cover, firstSeen, lastUpdated
| title | tags | expertise | cover | firstSeen | lastUpdated |
|---|---|---|---|---|---|
| Button fill animation | animation | beginner | blog_images/beach-pineapple.jpg | 2020-10-08T20:48:11+03:00 | 2021-04-02T21:34:43+03:00 |
Creates a fill animation on hover.
- Set a
colorandbackgroundand use an appropriatetransitionto animate changes to the element. - Use the
:hoverpseudo-class to change thebackgroundandcolorof the element when the user hovers over it.
<button class="animated-fill-button">Submit</button>
.animated-fill-button {
padding: 20px;
background: #fff;
color: #000;
border: 1px solid #000;
cursor: pointer;
transition: 0.3s all ease-in-out;
}
.animated-fill-button:hover {
background: #000;
color: #fff;
}