Текстовая анимация в виде мерцающих волн

XenForo Текстовая анимация в виде мерцающих волн

Совместимость с XenForo
  1. 2.2.x
Делаем модификацию в шаблоне PAGE_CONTAINER.
Найти:
Код:
</div> <!-- closing p-pageWrapper -->
Заменить:
Код:
$0
<xf:js>
const target = document.getElementById('shimmerWave');
function splitTextToSpans(targetElement) {
    if (targetElement) {
        const text = targetElement.textContent;
        targetElement.innerHTML = '';
        for (let character of text) {
            const span = document.createElement('span');
            if (character === ' ') {
                span.innerHTML = '&nbsp;';
            } else {
                span.textContent = character;
            }
            targetElement.appendChild(span);
        }
    }
}
splitTextToSpans(target);
</xf:js>
Вторая модификация в том же шаблоне, кто знает может в одну модификацию все сделать:
Найти:
Код:
<h1 class="p-title-value">{$h1}</h1>
Заменить
Код:
<h1 id="shimmerWave" class="p-title-value">{$h1}</h1>
И последняя модификация в шаблоне EXTRA.LESS добавляем стиль:
Выбираем регулярное выражение
Найти:
Код:
/^.*$/s
Заменить:
Код:
$0
#shimmerWave {
  color: #46afc8;
  font-size: 16px;
  font-family: "Open-Sans", sans-serif;
  font-weight: 600;
  perspective: 80px;
  transform-style: preserve-3d;
}
#shimmerWave span {
  position: relative;
  transition: all 0.3s ease;
  display: inline-block;
  -webkit-animation: wave 2.4s ease infinite;
          animation: wave 2.4s ease infinite;
  letter-spacing: 0.01em;
  transform-origin: 100% 50%;
  transform-style: preserve-3d;
}
#shimmerWave span:nth-child(1) {
  -webkit-animation-delay: 0s;
          animation-delay: 0s;
}
#shimmerWave span:nth-child(2) {
  -webkit-animation-delay: 0.05s;
          animation-delay: 0.05s;
}
#shimmerWave span:nth-child(3) {
  -webkit-animation-delay: 0.1s;
          animation-delay: 0.1s;
}
#shimmerWave span:nth-child(4) {
  -webkit-animation-delay: 0.15s;
          animation-delay: 0.15s;
}
#shimmerWave span:nth-child(5) {
  -webkit-animation-delay: 0.2s;
          animation-delay: 0.2s;
}
#shimmerWave span:nth-child(6) {
  -webkit-animation-delay: 0.25s;
          animation-delay: 0.25s;
}
#shimmerWave span:nth-child(7) {
  -webkit-animation-delay: 0.3s;
          animation-delay: 0.3s;
}
#shimmerWave span:nth-child(8) {
  -webkit-animation-delay: 0.35s;
          animation-delay: 0.35s;
}
#shimmerWave span:nth-child(9) {
  -webkit-animation-delay: 0.4s;
          animation-delay: 0.4s;
}
#shimmerWave span:nth-child(10) {
  -webkit-animation-delay: 0.45s;
          animation-delay: 0.45s;
}
#shimmerWave span:nth-child(11) {
  -webkit-animation-delay: 0.5s;
          animation-delay: 0.5s;
}
#shimmerWave span:nth-child(12) {
  -webkit-animation-delay: 0.55s;
          animation-delay: 0.55s;
}
#shimmerWave span:nth-child(13) {
  -webkit-animation-delay: 0.6s;
          animation-delay: 0.6s;
}
#shimmerWave span:nth-child(14) {
  -webkit-animation-delay: 0.65s;
          animation-delay: 0.65s;
}
#shimmerWave span:nth-child(15) {
  -webkit-animation-delay: 0.7s;
          animation-delay: 0.7s;
}
#shimmerWave span:nth-child(16) {
  -webkit-animation-delay: 0.75s;
          animation-delay: 0.75s;
}
#shimmerWave span:nth-child(17) {
  -webkit-animation-delay: 0.8s;
          animation-delay: 0.8s;
}
#shimmerWave span:nth-child(18) {
  -webkit-animation-delay: 0.85s;
          animation-delay: 0.85s;
}
#shimmerWave span:nth-child(19) {
  -webkit-animation-delay: 0.9s;
          animation-delay: 0.9s;
}
#shimmerWave span:nth-child(20) {
  -webkit-animation-delay: 0.95s;
          animation-delay: 0.95s;
}
#shimmerWave span:nth-child(21) {
  -webkit-animation-delay: 1s;
          animation-delay: 1s;
}
#shimmerWave span:nth-child(22) {
  -webkit-animation-delay: 1.05s;
          animation-delay: 1.05s;
}
#shimmerWave span:nth-child(23) {
  -webkit-animation-delay: 1.1s;
          animation-delay: 1.1s;
}
#shimmerWave span:nth-child(24) {
  -webkit-animation-delay: 1.15s;
          animation-delay: 1.15s;
}
#shimmerWave span:nth-child(25) {
  -webkit-animation-delay: 1.2s;
          animation-delay: 1.2s;
}
#shimmerWave span:nth-child(26) {
  -webkit-animation-delay: 1.25s;
          animation-delay: 1.25s;
}
#shimmerWave span:nth-child(27) {
  -webkit-animation-delay: 1.3s;
          animation-delay: 1.3s;
}
#shimmerWave span:nth-child(28) {
  -webkit-animation-delay: 1.35s;
          animation-delay: 1.35s;
}
#shimmerWave span:nth-child(29) {
  -webkit-animation-delay: 1.4s;
          animation-delay: 1.4s;
}
#shimmerWave span:nth-child(30) {
  -webkit-animation-delay: 1.45s;
          animation-delay: 1.45s;
}
#shimmerWave span:nth-child(31) {
  -webkit-animation-delay: 1.5s;
          animation-delay: 1.5s;
}
#shimmerWave span:nth-child(32) {
  -webkit-animation-delay: 1.55s;
          animation-delay: 1.55s;
}
#shimmerWave span:nth-child(33) {
  -webkit-animation-delay: 1.6s;
          animation-delay: 1.6s;
}
#shimmerWave span:nth-child(34) {
  -webkit-animation-delay: 1.65s;
          animation-delay: 1.65s;
}

@-webkit-keyframes wave {
  0% {
    transform: translate3D(0, 0, 0) scale(1) rotateY(0);
    color: #46afc8;
    text-shadow: 0 0 0 rgba(70, 175, 200, 0);
  }
  12% {
    transform: translate3D(2px, -2px, 2px) scale(1.16) rotateY(6deg);
    color: white;
  }
  15% {
    text-shadow: 0 0 2px #bce2eb;
  }
  24% {
    transform: translate3D(0, 0, 0) scale(1) rotateY(0);
    color: #6dc0d4;
    opacity: 1;
  }
  36% {
    transform: translate3D(0, 0, 0) scale(1);
  }
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
}

@keyframes wave {
  0% {
    transform: translate3D(0, 0, 0) scale(1) rotateY(0);
    color: #46afc8;
    text-shadow: 0 0 0 rgba(70, 175, 200, 0);
  }
  12% {
    transform: translate3D(2px, -2px, 2px) scale(1.16) rotateY(6deg);
    color: white;
  }
  15% {
    text-shadow: 0 0 2px #bce2eb;
  }
  24% {
    transform: translate3D(0, 0, 0) scale(1) rotateY(0);
    color: #6dc0d4;
    opacity: 1;
  }
  36% {
    transform: translate3D(0, 0, 0) scale(1);
  }
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
}
2.gif



Текстовая анимация в виде мерцающих волн
Текстовая анимация в виде мерцающих волн
Просмотры
12
Первый выпуск
Обновление
Рейтинг
0.00 звёзд Оценок: 0
  • Теги Теги
    xenforo
  • Ещё ресурсы от Groot

    Поделиться этим ресурсом

    Назад
    Верх