Skip to content

Commit

Permalink
Animation4 (#100)
Browse files Browse the repository at this point in the history
* created animated background effect

* loading animation effect

* soap bubble animation

* animated swipe button
  • Loading branch information
codermittal17 authored Oct 17, 2022
1 parent 610c720 commit b7943a5
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 0 deletions.
15 changes: 15 additions & 0 deletions SwipeButtonHover/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Swipe Button Hover Effects</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<a href="#" class="btn">Swipe Next<span><ion-icon name="arrow-forward-outline"></ion-icon></span></a>
<script type="module" src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.js"></script>
</body>
</html>
66 changes: 66 additions & 0 deletions SwipeButtonHover/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: #28272a;
}
.btn{
position: relative;
width: 200px;
height: 60px;
background: rgba(255, 255, 255, 0.1);
border-radius: 60px;
display: flex;
justify-content: center;
align-items: center;
color: rgba(255, 255, 255, 0.5);
text-decoration: none;
letter-spacing: 2px;
border-top: 0.5px solid rgba(255, 255, 255, 0.35);
border-left: 0.5px solid rgba(255, 255, 255, 0.35);
padding-left: 40px;
transition: 0.5s;
overflow: hidden;
}
.btn:hover{
padding-left: 0px;
padding-right: 40px;
color: rgba(255, 255, 255, 1);
}

.btn span{
position: absolute;
left: 5px;
width: 50px;
height: 50px;
background: #04fe4d;
border-radius: 50%;
transition: 0.5s ease-in-out;
display: flex;
justify-content: center;
align-items: center;
color: #1a191d;
font-size: 1.5em;
}
.btn:hover span{
left: calc(100% - 55px);
}
.btn:after{
content: '';
position: absolute;
width: 80px;
height: 100%;
z-index: 1;
background:rgba(255, 255, 255, 0.25);
transform: translateX(-170px) skew(30deg);
transition: 0.75s ease-in-out;
}
.btn:hover:after{
transform: translateX(170px) skew(30deg);
}

0 comments on commit b7943a5

Please sign in to comment.