Pure css to make a button shine and gently change colors over time

Video of the subscribe button in action: its slowly shifting gradient backgrounds, and how it grows and shines when a user hovers over it.

Shifting gradient backgrounds

Your basic button CSS — nothing too fancy here.
The CSS to create the background gradients for the button and then animate the movement with the help of CSS keyframes animation.

Shine animation on hover

p::first-line {
color: blue;
text-transform: uppercase;
The pseudo-element CSS for the button to make the shine effect and make it slide across the button on mouseover.
&::after {
transform: translateX(300px) skewX(-15deg);
transition: 0.7s;

Putting it altogether

The complete CSS for the button in one place. From basic styling, to background gradients, to shine effects.

Author: Shantun Parmar

4 thoughts on “Pure css to make a button shine and gently change colors over time

  1. I enjoy you because of all of the effort on this blog. Betty delights in carrying out internet research and it’s easy to see why. A lot of people hear all about the compelling form you convey both interesting and useful guidance by means of the blog and attract contribution from other individuals about this area and my child has always been becoming educated a great deal. Enjoy the remaining portion of the new year. You’re carrying out a dazzling job.

Thanks for your support, You may click on ads to encourage us which assits to writers.

Leave a Reply

Your email address will not be published.