๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

FA/html๏ผcss

20220923 ๋ชจ๋ฐ”์ผ ์ฐฝ์—์„œ input ํด๋ฆญ ์‹œ ํ™•๋Œ€ ๋ฐฉ์ง€

๋ชจ๋ฐ”์ผ์—์„œ input ์ž…๋ ฅ์ฐฝ์„ ํด๋ฆญํ•˜๋ฉด, ํ™”๋ฉด์ด ํ™•๋Œ€๋  ๋•Œ

ํ™”๋ฉด ์ž๋™ํ™•๋Œ€ ๋ฐฉ์ง€ ๋ฐฉ๋ฒ•

<head>์—ฌ๊ธฐ์— ๋„ฃ๊ธฐ~</head> meta ํƒœ๊ทธ๋ฅผ ์ถ”๊ฐ€ (react ๊ฐ™์€ ๊ฒฝ์šฐ index.html์— ์ถ”๊ฐ€)

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" >

 

viewport ์†์„ฑ

width=device-width ํ™”๋ฉด ๋„ˆ๋น„๋ฅผ ๊ธฐ๊ณ„ ๋„ˆ๋น„๋กœ ๋งž์ถค
initial-scale=1.0  ์ดˆ๊ธฐ ํ™”๋ฉด ํฌ๊ธฐ ๋ฐฐ์œจ ์„ค์ •
minimum-scale=1 ์ตœ์†Œ ํ™”๋ฉด ํฌ๊ธฐ ์„ค์ •
maximum-scale=1 ์ตœ๋Œ€ ํ™”๋ฉด ํฌ๊ธฐ ์„ค์ •
user-scalable=no ์‚ฌ์šฉ์ž๊ฐ€ ํ™”๋ฉด ํ™•๋Œ€/์ถ•์†Œ ๊ฐ€๋Šฅ ์—ฌ๋ถ€ ์„ค์ •
target-densitydpi=device-dpi ํ•ด๋‹น๋„๋ฅผ ๊ธฐ๊ธฐ์— ๋งž์ถค ์„ค์ •

 

์ฐธ๊ณ  ๋ฐ ์ถœ์ฒ˜

https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_meta_tag

 

Viewport meta tag - HTML: HyperText Markup Language | MDN

This article describes how to use the "viewport" <meta> tag to control the viewport's size and shape.

developer.mozilla.org