@charset "utf-8"; /* CSS Document */ *{ margin: 0; padding: 0; box-sizing: border-box; font-family: Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, "sans-serif"; } body{ display: flex; justify-content: center; align-items: center; min-height: 50vw; background: #2F0073; } h2{ position: relative; font-size: 14vw; color: #2F0073; -webkit-text-stroke: 0.3vw #2F0073; text-transform: uppercase; } h2::before{ content: attr(data-text); position: absolute; top: 0; left: 0; width: 0; height: 90%; color: #01fe87; -webkit-text-stroke: 0vw #2F0073; border-right: 2px solid #01fe87; overflow: hidden; animation: animate 6s linear infinite; } @keyframes animate { 0%,10%, 100%{ width: 0; } 70%, 90%{ width: 100%; } }