12% off of LTD using this coupon: TWELVEPERCENTOFF. Promo ends on 2 Dec midnight UTC.
Published on Mar 14, 2022

Ripple effect on hover for links and buttons

Sridhar Katakam

Looking for a nice ripple effect on links and buttons when they are hovered?

Demo:

Hover me

Here’s the CSS for that:

.ripple {
	/*background: #79b928;
	color: #fff;*/
	padding: 20px 23px;
	position: relative;
	overflow: hidden;
}

.ripple::before {
	content: "";
	position: absolute;
	background-color: rgba(0,0,0,.1);
	width: 10%;
	height: 25%;
	border-radius: 50%;
	z-index: 1;
	top: 35%;
	left: 45%;
	-webkit-transform: scale(0);
	transform: scale(0);
}

/*.ripple:hover {
	background: #74b126;
	color: #fff;
}*/

.ripple:hover::before {
	-webkit-transform: scale(12);
	transform: scale(12);
	-webkit-transition: border-radius .5s .5s,-webkit-transform .5s;
	transition: border-radius .5s .5s,-webkit-transform .5s;
	transition: transform .5s,border-radius .5s .5s;
	transition: transform .5s,border-radius .5s .5s,-webkit-transform .5s;
}

.ripple:hover::after {
	content: "";
	position: absolute;
	z-index: 2;
	left: 50%;
	-webkit-transform: translateX(-50%);
	transform: translateX(-50%);
}

Add ripple class to a elements and/or button elements for which you wish to apply the effect.

Source

https://www.dyson.com.au/dyson-v7-motorhead-origin

tagschevron-leftchevron-rightchainangle-rightangle-upangle-downfolder-omagnifiercrossmenuchevron-downarrow-right