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

Нет описания правки
Нет описания правки
Строка 1: Строка 1:
.running-line {
.wiki-ticker {
     position: relative;
     position: relative;
     width: 100%;
     width: 100%;
Строка 7: Строка 7:
}
}


.running-line__item {
.wiki-ticker > span {
     position: absolute;
     position: absolute;
     top: 50%;
     top: 50%;
    left: 100%;
     transform: translateY(-50%);
     transform: translateY(-50%);
     left: 100%;
     white-space: nowrap;
 
    opacity: 0;
     animation-name: running-line-scroll;
     animation-name: wiki-ticker-animation;
     animation-duration: 15s;
     animation-duration: 60s;
     animation-timing-function: linear;
     animation-timing-function: linear;
     animation-iteration-count: infinite;
     animation-iteration-count: infinite;
}
}


/* Следующий текст появляется после окончания предыдущего */
/* Первый текст */
.running-line__item:nth-child(1) {
.wiki-ticker > span:nth-child(1) {
     animation-delay: 0s;
     animation-delay: 0s;
}
}


.running-line__item:nth-child(2) {
/* Второй текст */
     animation-delay: 15s;
.wiki-ticker > span:nth-child(2) {
     animation-delay: -12s;
}
}


.running-line__item:nth-child(3) {
/* Третий текст */
     animation-delay: 30s;
.wiki-ticker > span:nth-child(3) {
     animation-delay: -24s;
}
}


.running-line__item:nth-child(4) {
/* Четвёртый текст */
     animation-delay: 45s;
.wiki-ticker > span:nth-child(4) {
     animation-delay: -36s;
}
}


.running-line__item:nth-child(5) {
/* Пятый текст */
     animation-delay: 60s;
.wiki-ticker > span:nth-child(5) {
     animation-delay: -48s;
}
}


@keyframes running-line-scroll {
@keyframes wiki-ticker-animation {
     0% {
     0% {
         left: 100%;
         left: 100%;
        transform: translateY(-50%);
        opacity: 1;
    }
    20% {
        left: 0;
        transform: translate(-100%, -50%);
        opacity: 1;
    }
    20.01% {
        opacity: 0;
     }
     }


     100% {
     100% {
         left: -100%;
         opacity: 0;
     }
     }
}
}