I have limited experience with CSS animations and my client is looking to achieve a hover effect similar to the one shown here when hovering over the contact
button:
Just to clarify, they are looking for:
- The square to move from left to right and then back again
- As the square moves, the color of the line underneath it should change
The top image shows the start state, the middle image represents the effect at 50%, and the bottom image shows the end result.
Can this be achieved using only CSS, or would JavaScript be necessary as well? How should I go about implementing this?