The shine effect in CSS is a visual technique that creates a glowing or shimmering appearance on elements. It’s typically achieved using CSS gradients and animations. The gradient simulates light reflection, while the animation moves the gradient, creating the dynamic shine effect.
To create a shine effect in CSS, use a combination of linear-gradient
for the light reflection and @keyframes
animation to move the gradient across the element. This creates a dynamic, shimmering appearance. For instance, apply a linear gradient to a pseudo-element like ::after
and animate it to slide across the element.
In this post, I have shared a collection of 14+ CSS shine effects that I picked from CodePen. These examples include a variety of effects such as button shine animation in CSS, shine borders, CSS background shine and many more.
Updated Collection Info:
In May 2024, this post was updated to include 1 new additional item.