Skip to content

Instantly share code, notes, and snippets.

@makone93
Last active May 27, 2020 16:52
Show Gist options
  • Save makone93/1b63a3b25c7815af6f57ef229679f081 to your computer and use it in GitHub Desktop.
Save makone93/1b63a3b25c7815af6f57ef229679f081 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.button {
border-radius: 4px;
background-color: #f4511e;
border: none;
color: #FFFFFF;
text-align: center;
font-size: 28px;
padding: 20px;
width: 200px;
transition: all 0.5s;
cursor: pointer;
margin: 5px;
}
.button span {
cursor: pointer;
display: inline-block;
position: relative;
transition: 0.5s;
}
.button span:after {
content: '\00bb';
position: absolute;
opacity: 0;
top: 0;
right: -20px;
transition: 0.5s;
}
.button:hover span {
padding-right: 25px;
}
.button:hover span:after {
opacity: 1;
right: 0;
}
</style>
</head>
<body>
<h2>Animated Button</h2>
<button class="button"><span>Hover </span></button>
</body>
</html>
@makone93
Copy link
Author

This button is entirely copied from w3schools website

W3schools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment