[miniProjects] 39_Password Strength Background

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

miniProjects

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

39_Password Strength Background

๐Ÿ’ป์ฃผ์ œ : ๋กœ๊ทธ์ธ ์–‘์‹, ์•”ํ˜ธ์˜ ๊ฐ•๋„์— ๋”ฐ๋ผ ๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง€์˜ ํ๋ฆผ๋„๊ฐ€ ๊ฒฐ์ •๋จ.

  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/1.8.11/tailwind.min.css" integrity="sha512-KO1h5ynYuqsFuEicc7DmOQc+S9m2xiCKYlC3zcZCSEw0RGDsxcMnppRaMZnb0DdzTDPaW22ID/gAGCZ9i+RT/w==" crossorigin="anonymous"/>

โœจJS

password.addEventListener('input', (e) => {
  const input = e.target.value
  const length = input.length
  const blurValue = 20-length*2
  background.style.filter = `blur(${blurValue}px)`
})

filter: blur(20px)์œผ๋กœ ๊ธฐ๋ณธ๊ฐ’์ด ์„ค์ •๋˜์—ˆ๊ธฐ ๋•Œ๋ฌธ์—
๋ฐฑํ‹ฑ ๊ธฐํ˜ธ๋ฅผ ์‚ฌ์šฉํ•ด filter๋ฅผ ๋ณ€๊ฒฝํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•จ.

profile
์ •์‹ ์ฐจ๋ ค ์ด ๊ฐ๋ฐ•ํ•œ ์„ธ์ƒ์†์—์„œ

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