Шаблон:Бегущая строка/styles.css: различия между версиями

Материал из Space Station 14 Вики
Нет описания правки
Нет описания правки
Строка 1: Строка 1:
.ticker {
.running-text {
     width: 100%;
     width: 100%;
    height: 30px;
     overflow: hidden;
     overflow: hidden;
     position: relative;
     position: relative;
Строка 6: Строка 7:
}
}


.ticker__track {
.running-text__content {
     display: inline-flex;
     position: absolute;
     width: max-content;
     left: 100%;
     animation: ticker-scroll 30s linear infinite;
     top: 50%;
}
     transform: translateY(-50%);
 
     white-space: nowrap;
.ticker__track span {
     animation: running-text-scroll 10s linear infinite;
     display: inline-block;
     flex-shrink: 0;
     padding-right: 80px;
}
}


@keyframes ticker-scroll {
@keyframes running-text-scroll {
     from {
     from {
         transform: translateX(100%);
         left: 100%;
     }
     }


     to {
     to {
         transform: translateX(-100%);
         left: -100%;
     }
     }
}
}

Версия от 16:25, 3 сентября 2026

.running-text {
    width: 100%;
    height: 30px;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
}

.running-text__content {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    animation: running-text-scroll 10s linear infinite;
}

@keyframes running-text-scroll {
    from {
        left: 100%;
    }

    to {
        left: -100%;
    }
}