Шаблон:Бегущая строка/styles.css: различия между версиями
Aeonorien (обсуждение | вклад) Нет описания правки |
Aeonorien (обсуждение | вклад) Нет описания правки |
||
| Строка 1: | Строка 1: | ||
. | .marquee { | ||
overflow: hidden; | |||
white-space: nowrap; | |||
width: 100%; | |||
height: 2em; | |||
line-height: 2em; | |||
position: relative; | |||
} | } | ||
. | .marquee span { | ||
position: absolute; | |||
top: 0; | |||
left: 0; | |||
white-space: nowrap; | |||
color: #eaeaea; | |||
opacity: 0; | |||
animation: scroll 16s linear infinite; | |||
} | } | ||
.marquee span:nth-child(1) { animation-delay: 0s; } | |||
.marquee span:nth-child(2) { animation-delay: 16s; } | |||
.marquee span:nth-child(3) { animation-delay: 32s; } | |||
.marquee span:nth-child(4) { animation-delay: 48s; } | |||
.marquee span:nth-child(5) { animation-delay: 64s; } | |||
@keyframes scroll { | |||
0% { | |||
} | transform: translateX(100%); | ||
opacity: 0; | |||
} | |||
3% { | |||
opacity: 1; | |||
} | |||
70% { | |||
transform: translateX(-120%); | |||
opacity: 1; | |||
} | |||
75% { | |||
opacity: 0; | |||
} | |||
100% { | |||
transform: translateX(-120%); | |||
opacity: 0; | |||
} | |||
} | } | ||