pkg-components
Version:
69 lines (60 loc) • 1.31 kB
CSS
.marquee-container {
display: flex ;
flex-direction: row ;
position: relative;
width: 100%;
overflow: hidden;
}
.marquee-container:hover .marquee {
animation-play-state: var(--pause-on-hover);
}
.marquee-container:active .marquee {
animation-play-state: var(--pause-on-click);
}
.overlay {
position: absolute;
width: 100%;
height: 100%;
z-index: 2;
}
.overlay::before,
.overlay::after {
content: "";
position: absolute;
width: var(--gradient-width);
height: 100%;
background: linear-gradient(to right, var(--gradient-color));
}
.overlay::before {
left: 0;
top: 0;
}
.overlay::after {
right: 0;
top: 0;
transform: rotateZ(180deg);
}
.marquee {
flex: 0 0 auto;
min-width: 100%;
display: flex;
flex-direction: row;
align-items: center;
animation-name: scroll;
animation-timing-function: linear;
animation-fill-mode: forwards;
z-index: 1;
animation-duration: var(--duration);
animation-delay: var(--delay);
animation-iteration-count: var(--iteration-count);
animation-direction: var(--direction);
animation-play-state: var(--play);
}
@keyframes scroll {
0% {
transform: translateX(0%);
}
100% {
transform: translateX(-100%);
}
}