Snippet 6 : Hover Effect Button – 6

Efek yang akan ditampilkan adalah swipe background yang lebih unik.

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

a {
	text-decoration: none;
	background-color: #262626;
	font-family: sans-serif;
	font-size: 40px;
	border: 4px solid #262626;
	padding: 40px 80px;
	position: relative;
	color: transparent;
	overflow: hidden;
}

a:before {
	content: 'Hover Me';
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 100%;
	background-color: #fffa65;
	color: #262626;
	display: flex;
	justify-content: center;
	align-items: center;
	transition: all 0.5s;
}

a:after {
	content: 'Skillplus';
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 100%;
	background-color: #fffa65;
	color: #262626;
	display: flex;
	justify-content: center;
	align-items: center;
	transition: all 0.5s;
	transform: translate(-100%, 100%);
}

a:hover:before {
	transform: translate(100%, -100%);
}

a:hover:after {
	transform: translate(0, 0);
}
Sharing is caring:

Leave a Comment