Skip to content

Commit

Permalink
add back to top button
Browse files Browse the repository at this point in the history
  • Loading branch information
alidevjimmy committed Sep 10, 2024
1 parent 30faaad commit ab43e77
Show file tree
Hide file tree
Showing 3 changed files with 215 additions and 143 deletions.
57 changes: 57 additions & 0 deletions assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -1242,3 +1242,60 @@ html {
box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
}
}

.button-go-to-top {
width: 50px;
height: 50px;
border-radius: 50%;
background-color: rgb(20, 20, 20);
border: none;
font-weight: 600;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0px 0px 0px 4px rgba(180, 160, 255, 0.253);
cursor: pointer;
transition-duration: 0.3s;
overflow: hidden;
position: relative;
}

.svgIcon {
width: 12px;
transition-duration: 0.3s;
}

.svgIcon path {
fill: white;
}

.button-go-to-top:hover {
width: 140px;
border-radius: 50px;
transition-duration: 0.3s;
background-color: #7064e9;
align-items: center;
}

.button-go-to-top:hover .svgIcon {
/* width: 20px; */
transition-duration: 0.3s;
transform: translateY(-200%);
}

.button-go-to-top::before {
position: absolute;
bottom: -20px;
content: "Back to Top";
color: white;
/* transition-duration: .3s; */
font-size: 0px;
}

.button-go-to-top:hover::before {
font-size: 13px;
opacity: 1;
bottom: unset;
/* transform: translateY(-30px); */
transition-duration: 0.3s;
}
Loading

0 comments on commit ab43e77

Please sign in to comment.