Skip to content

Commit

Permalink
Merge pull request #232 from muditkashyap/master
Browse files Browse the repository at this point in the history
Solve #158 Created animated hover button
  • Loading branch information
stevemao committed Oct 18, 2023
2 parents c1e3dbb + 6e767d1 commit 2911c4d
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
53 changes: 53 additions & 0 deletions examples/animated-button.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Animated Box</title>
</head>
<body>

<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #4e4d4d;
}

.animated-button {
background-color: #111;
border: none;
color: #fff;
padding: 10px 20px;
font-size: 18px;
border-radius: 5px;
cursor: pointer;
position: relative;
overflow: hidden;
}

.animated-button::before {
content: '';
position: absolute;
background: #0ff;
width: 100%;
height: 100%;
top: 0;
left: -100%;
transition: 0.3s;
}

.animated-button:hover::before {
left: 100%;
}


</style>

<button class="animated-button">Click Me</button>

</body>
</html>

0 comments on commit 2911c4d

Please sign in to comment.