:root{
    --width900: 900;
    --height600: 600;
    --speed: 2s;
    --count: 5;

    --width500: 500;
    --height700: 700;
}
.my-slider1-container{
    width: calc(var(--width900)*1px);
    height: calc(var(--height600)*1px);
    overflow: hidden;
    background-color: red;
}
.my-slider1-box{
    display: flex;
    flex-direction: row;
    animation: my-slider1-box-move calc(var(--speed)*var(--count)) steps(var(--count)) infinite;
}
.my-slider1-item{
    width: 100%;
    height: calc(var(--height600)*1px);
    animation: my-slider1-item-move calc(var(--speed)) infinite;
    position: relative;
}
.my-slider1-item img{
    width: calc(var(--width900)*1px);
    height: calc(var(--height600)*1px);
    object-fit: cover;
}
.my-slider1-item-title{
    position: absolute;
    left: 0;
    bottom: 0;
    height: 60px;
    line-height: 60px;
    overflow: hidden;
    padding: 0 15px;
    background-color: rgba(0,0,0, 0.6);
    color: white;
    font-size: 24px;
}
@keyframes my-slider1-box-move {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate( calc(var(--count) * var(--width900) * -1px), 0);
    }
}

@keyframes my-slider1-item-move {
    0% {
        transform: translate(0, 0);
    }
    80%,
    100%  {
        transform: translate(calc(var(--width900) * -1px), 0);
    }
}

.my-slider2-container{
    width: calc(var(--width500)*1px);
    height: calc(var(--height700)*1px);
    overflow: hidden;
    background-color: red;
}
.my-slider2-box{
    display: flex;
    flex-direction: row;
    animation: my-slider2-box-move calc(var(--speed)*var(--count)) steps(var(--count)) infinite;
}
.my-slider2-item{
    width: 100%;
    height: calc(var(--height700)*1px);
    animation: my-slider2-item-move calc(var(--speed)) infinite;
    position: relative;
}
.my-slider2-item img{
    width: calc(var(--width500)*1px);
    height: calc(var(--height700)*1px);
    object-fit: cover;
}
.my-slider2-item-title{
    position: absolute;
    left: 0;
    bottom: 0;
    height: 60px;
    line-height: 60px;
    overflow: hidden;
    padding: 0 15px;
    background-color: rgba(0,0,0, 0.6);
    color: white;
    font-size: 24px;
}
@keyframes my-slider2-box-move {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate( calc(var(--count) * var(--width500) * -1px), 0);
    }
}

@keyframes my-slider2-item-move {
    0% {
        transform: translate(0, 0);
    }
    80%,
    100%  {
        transform: translate(calc(var(--width500) * -1px), 0);
    }
}

<!--ecms sync check [sync_thread_id="3bcee7cc5a424330844ab778a62d31c1" sync_date="2023-02-17 22:31:54" check_sum="3bcee7cc5a424330844ab778a62d31c1]-->