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

Материал из Space Station 14 Вики
Нет описания правки
Нет описания правки
Строка 3: Строка 3:
   white-space: nowrap;
   white-space: nowrap;
   width: 100%;
   width: 100%;
   height: 1.8em;
   height: 2em;
   line-height: 1.8em;
   line-height: 2em;
   position: relative;
   position: relative;
}
}
Строка 14: Строка 14:
   white-space: nowrap;
   white-space: nowrap;
   color: #eaeaea;
   color: #eaeaea;
  animation: scroll 15s linear infinite;
   opacity: 0;
   opacity: 0;
  animation: scroll 12s linear infinite;
}
}


.marquee span:nth-child(1) { animation-delay: 0s; }
.marquee span:nth-child(1) { animation-delay: 0s; }
.marquee span:nth-child(2) { animation-delay: 15s; }
.marquee span:nth-child(2) { animation-delay: 12s; }
.marquee span:nth-child(3) { animation-delay: 30s; }
.marquee span:nth-child(3) { animation-delay: 24s; }
.marquee span:nth-child(4) { animation-delay: 45s; }
.marquee span:nth-child(4) { animation-delay: 36s; }
.marquee span:nth-child(5) { animation-delay: 60s; }
.marquee span:nth-child(5) { animation-delay: 48s; }


@keyframes scroll {
@keyframes scroll {
Строка 29: Строка 29:
     opacity: 1;
     opacity: 1;
   }
   }
   70% {
   10% {
    transform: translateX(100%);
    opacity: 1;
  }
  80% {
     transform: translateX(-110%);
     transform: translateX(-110%);
     opacity: 1;
     opacity: 1;
   }
   }
   71%, 100% {
   85% {
    opacity: 0;
  }
  100% {
     transform: translateX(-110%);
     transform: translateX(-110%);
     opacity: 0;
     opacity: 0;
   }
   }
}
}

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

.marquee {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  height: 2em;
  line-height: 2em;
  position: relative;
}

.marquee span {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  color: #eaeaea;
  opacity: 0;
  animation: scroll 12s linear infinite;
}

.marquee span:nth-child(1) { animation-delay: 0s; }
.marquee span:nth-child(2) { animation-delay: 12s; }
.marquee span:nth-child(3) { animation-delay: 24s; }
.marquee span:nth-child(4) { animation-delay: 36s; }
.marquee span:nth-child(5) { animation-delay: 48s; }

@keyframes scroll {
  0% {
    transform: translateX(100%);
    opacity: 1;
  }
  10% {
    transform: translateX(100%);
    opacity: 1;
  }
  80% {
    transform: translateX(-110%);
    opacity: 1;
  }
  85% {
    opacity: 0;
  }
  100% {
    transform: translateX(-110%);
    opacity: 0;
  }
}