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

Материал из Space Station 14 Вики
Нет описания правки
Нет описания правки
Строка 1: Строка 1:
.marquee {
.marquee {
   overflow: hidden;
   overflow: hidden;
   white-space: nowrap;
   height: 2.2em;
  line-height: 2.2em;
  position: relative;
   width: 100%;
   width: 100%;
  height: 2em;
  line-height: 2em;
  position: relative;
}
}


.marquee span {
.marquee-inner {
   position: absolute;
   position: absolute;
   top: 0;
   width: 100%;
   left: 0;
  animation: vertical-scroll 16s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
 
.marquee-inner span {
  display: block;
  height: 2.2em;
   line-height: 2.2em;
  color: #eaeaea;
   white-space: nowrap;
   white-space: nowrap;
   color: #eaeaea;
   overflow: hidden;
   opacity: 0;
   text-overflow: ellipsis;
  animation: scroll 14s linear infinite;
}
}


.marquee span:nth-child(1) { animation-delay: 0s; }
@keyframes vertical-scroll {
.marquee span:nth-child(2) { animation-delay: 14s; }
  0%, 18%  { transform: translateY(0); }
.marquee span:nth-child(3) { animation-delay: 28s; }
  22%, 40%  { transform: translateY(-2.2em); }
.marquee span:nth-child(4) { animation-delay: 42s; }
   44%, 62% { transform: translateY(-4.4em); }
.marquee span:nth-child(5) { animation-delay: 56s; }
   66%, 84% { transform: translateY(-6.6em); }
 
   88%, 100% { transform: translateY(-8.8em); }
@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:18, 3 сентября 2026

.marquee {
  overflow: hidden;
  height: 2.2em;
  line-height: 2.2em;
  position: relative;
  width: 100%;
}

.marquee-inner {
  position: absolute;
  width: 100%;
  animation: vertical-scroll 16s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.marquee-inner span {
  display: block;
  height: 2.2em;
  line-height: 2.2em;
  color: #eaeaea;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes vertical-scroll {
  0%, 18%   { transform: translateY(0); }
  22%, 40%  { transform: translateY(-2.2em); }
  44%, 62%  { transform: translateY(-4.4em); }
  66%, 84%  { transform: translateY(-6.6em); }
  88%, 100% { transform: translateY(-8.8em); }
}