Skip to content

Instantly share code, notes, and snippets.

@ichii731
Created April 20, 2021 02:37
Show Gist options
  • Save ichii731/580ba02ad18e506344cea0968c004283 to your computer and use it in GitHub Desktop.
Save ichii731/580ba02ad18e506344cea0968c004283 to your computer and use it in GitHub Desktop.
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
html {
font-size: 40px;
font-family: "Montserrat";
scroll-behavior: smooth;
}
section {
min-height: 100vh;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
#sec-1 {
background-color: #ffd60a;
}
#sec-2 {
background-color: aliceblue;
}
.scroll-down {
height: 50px;
width: 30px;
border: 2px solid black;
position: absolute;
left: 50%;
bottom: 20px;
border-radius: 50px;
cursor: pointer;
}
.scroll-down::before,
.scroll-down::after {
content: "";
position: absolute;
top: 20%;
left: 50%;
height: 10px;
width: 10px;
transform: translate(-50%, -100%) rotate(45deg);
border: 2px solid black;
border-top: transparent;
border-left: transparent;
animation: scroll-down 1s ease-in-out infinite;
}
.scroll-down::before {
top: 30%;
animation-delay: 0.3s;
/* animation: scroll-down 1s ease-in-out infinite; */
}
@keyframes scroll-down {
0% {
/* top:20%; */
opacity: 0;
}
30% {
opacity: 1;
}
60% {
opacity: 1;
}
100% {
top: 90%;
opacity: 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment