Frontend Forever App
We have a mobile app for you to download and use. And you can unlock many features in the app.
Get it now
Intall Later
Run
HTML
CSS
Javascript
Output
body { background: #3e428b; } .container { height: 100vh; display: grid; place-items: center; max-width: 800px; margin: 0 auto; } .st0 { display: none; }
const stretchBeginLetters = [...document.querySelectorAll('#stretchBegin path')]; const stretchEndLetters = [...document.querySelectorAll('#stretchEnd path')]; const messageBeginLetters = [...document.querySelectorAll('#messageBegin path')]; const messageEndLetters = [...document.querySelectorAll('#messageEnd path')]; let tl = gsap.timeline({defaults: { ease: 'back.inOut(2)', duration: 1, repeat: -1, yoyo: true, }}); stretchBeginLetters.forEach((letter, i) => { tl.to(letter, { morphSVG: stretchEndLetters[i], }) .to(messageBeginLetters[i], { morphSVG: messageEndLetters[i] }, '<'); });