Visual design. Use CSS Animation to Change the Hover State of a Button
Use CSS Animation to Change the Hover State of a Button You can use CSS @keyframes to change the color of a button in its hover state. Here's an example of changing the width of an image on hover: img:hover { animation-name: width; animation-duration: 500ms; } @keyframes width { 100% { width: 40px; } } Note that ms stands for milliseconds, where 1000ms is equal to 1s. Use CSS @keyframes to chang..