Website/assets/scss/components/_scroll.scss
Martin Gasque 0ba3f3c7c5 Initial commit
Will it deploy one day ?
2024-02-20 08:59:37 +01:00

51 lines
733 B
SCSS

$animationSpeed: 40s;
// Animation
@keyframes scroll {
0% {
transform: translateX(0);
}
100% {
transform: translateX(calc(-250px * 7));
}
}
.slider {
display: flex;
width: 100%;
flex-direction: row;
justify-content: space-between;
position: relative;
overflow: hidden;
&::before,
&::after {
content: "";
height: 100px;
position: absolute;
width: 200px;
z-index: 2;
}
&::after {
right: 0;
top: 0;
transform: rotateZ(180deg);
}
&::before {
left: 0;
top: 0;
}
.slide-track {
animation: scroll $animationSpeed linear infinite;
display: flex;
width: calc(250px * 14);
}
.slide-track:hover {
animation-play-state: paused;
}
}