[miniProjects] 08_Form Wave Animation

๋ณด๋ฆฌยท2023๋…„ 6์›” 16์ผ
0

miniProjects

๋ชฉ๋ก ๋ณด๊ธฐ
9/47

08_Form Wave Animation

๐Ÿ’ป ์ฃผ์ œ : ๋กœ๊ทธ์ธ ์–‘์‹์ด์ง€๋งŒ ์ž…๋ ฅ์นธ์— ๋งˆ์šฐ์Šค๋ฅผ ์˜ฌ๋ ค๋‘๋ฉด ๊ธ€์ž๊ฐ€ ์›จ์ด๋ธŒ๋กœ ์›€์ง์ž„.

  • ๊ฐ๊ฐ์˜ ๊ธ€์ž๋ฅผ span์œผ๋กœ ๋ฌถ์–ด ๊ฐœ๋ณ„์ ์œผ๋กœ ์›€์ง์ด๊ฒŒ ํ•จ.


labels.forEach(label => {
  label.innerHTML = label.innerText
    // ๋ฐฐ์—ด์„ ๋‚˜๋ˆ  ๊ฐ๊ฐ์˜ ๊ธ€์ž๋ฅผ 
    .split('')
    // ์ƒˆ๋กœ์šด ๋ฐฐ์—ด์— ๋„ฃ์Œ.(span์„ ๋‘˜๋Ÿฌ ๊ธ€์ž์˜ ๋ฐฐ์—ด์„ ๋งŒ๋“ฆ.)
    .map((letter, idx) => `<span style = "transition-delay:${idx * 50}ms">${letter}</span>`)
    .join('');
})
profile
์ •์‹ ์ฐจ๋ ค ์ด ๊ฐ๋ฐ•ํ•œ ์„ธ์ƒ์†์—์„œ

0๊ฐœ์˜ ๋Œ“๊ธ€