51 lines
733 B
SCSS
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;
|
|
}
|
|
}
|