Snippet 3 : Hover Effect Button – 3

Efek pada snippet ini adalah swipe namun lebih kompleks.

body {
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

a {
	padding: 40px 80px;
	font-family: sans-serif;
	text-decoration: none;
	color: #262626;
	font-size: 45px;
	letter-spacing: 2px;
	border: 5px solid #262626;
	position: relative;
	transition: 1s;
}

a:before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: #262626;
	transition: 1s;
	transform: rotateX(90deg);
	z-index: -1;
}

a:after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: #262626;
	transition: 1s;
	transform: rotateY(90deg);
	z-index: -1;
}

a:hover:before {
	transform: rotateX(0);
}

a:hover:after {
	transform: rotateY(0);
}

a:hover {
	color: white;
}
Sharing is caring:

Leave a Comment