When you want something to stand out, giving a word an animated underline or highlight effect is a great way to draw attention to it.
Give your element a custom class, here we'll use .anim-bg.
Change the speed of the animation by modifying the 0.6s on the animation line.
If you want to control the acceleration and deceleration of the animation, you can adjust the timing function using the animation-timing-function property or by adding it to the shorthand animation property.
The default value is ease, which starts slow, becomes faster in the middle of the animation, and slows down at the end. Some other common values include:
Codepen demo;