.class-name h2:nth-child(1) { color: transparent; -webkit-text-stroke: 2px #338fbb; } .class-name h2 { position: absolute; top: 7.5%; left: 16.2%; font-size: 3em; } .class-name h2:nth-child(2) { color: #338fbb; animation: animate 4s ease-in-out infinite; } @keyframes animate { 0%,100% { clip-path: polygon(0% 40%, 16% 45%, 30% 51%, 53% 63%, 71% 62%, 83% 58%, 100% 51%, 100% 100%, 0% 100%); } 50% { clip-path: polygon(0% 80%, 15% 64%, 33% 65%, 50% 61%, 60% 51%, 88% 43%, 100% 46%, 100% 100%, 0% 100%); } }