<div class="scroll-indicator">
<span>Scroll</span>
<div class="line"></div>
</div>
.scroll-indicator {
position: absolute;
bottom: 10px;
left: 50%;
transform: translateX(-50%);
text-align: center;
font-family: 'Helvetica Neue', sans-serif;
font-size: 11px;
letter-spacing: 2px;
color: white;
z-index: 10;
}
.scroll-indicator .line {
position: relative;
width: 1px;
height: 40px;
margin: 8px auto 0;
background: transparent;
overflow: hidden;
}
.scroll-indicator .line::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 0.3px;
height: 100%;
background: white;
animation: scrollDownFadeOut 1.5s ease-in-out infinite;
transform-origin: top;
}
@keyframes scrollDownFadeOut {
0% {
transform: scaleY(0);
opacity: 0.8;
}
70% {
transform: scaleY(1);
opacity: 1;
}
100% {
transform: scaleY(1);
opacity: 0;
}
}
コメント