Created
April 20, 2021 02:37
-
-
Save ichii731/580ba02ad18e506344cea0968c004283 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* { | |
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