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

Материал из Space Station 14 Вики
Нет описания правки
Нет описания правки
Метка: ручная отмена
 
(не показано 6 промежуточных версий этого же участника)
Строка 1: Строка 1:
.marquee {
.marquee {
  display: block;
   overflow: hidden;
   overflow: hidden;
   white-space: nowrap;
   white-space: nowrap;
   width: 100%;
   width: 100%;
   height: 2em;
   padding: 8px 0;
   line-height: 2em;
   box-sizing: border-box;
  position: relative;
}
}
 
.marquee-inner {
.marquee span {
   display: inline-block;
   position: absolute;
  top: 0;
  left: 0;
   white-space: nowrap;
   white-space: nowrap;
  padding-left: 100%;
  animation: marquee 22s linear infinite;
   color: #eaeaea;
   color: #eaeaea;
  opacity: 0;
  animation: scroll 14s linear infinite;
}
}
 
@keyframes marquee {
.marquee span:nth-child(1) { animation-delay: 0s; }
   0% { transform: translateX(0); }
.marquee span:nth-child(2) { animation-delay: 14s; }
   100% { transform: translateX(-100%); }
.marquee span:nth-child(3) { animation-delay: 28s; }
.marquee span:nth-child(4) { animation-delay: 42s; }
.marquee span:nth-child(5) { animation-delay: 56s; }
 
@keyframes scroll {
   0% {
    transform: translateX(100%);
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  75% {
    transform: translateX(-110%);
    opacity: 1;
  }
  80% {
    opacity: 0;
  }
   100% {
    transform: translateX(-110%);
    opacity: 0;
  }
}
}

Текущая версия от 16:30, 3 сентября 2026

.marquee {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  padding: 8px 0;
  box-sizing: border-box;
}
.marquee-inner {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  animation: marquee 22s linear infinite;
  color: #eaeaea;
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}