๊ด€๋ฆฌ ๋ฉ”๋‰ด

Outputor

CSS input ์ •๋ฆฌ ๋ณธ๋ฌธ

๐ŸŽจ CSS ๐Ÿ”ป

CSS input ์ •๋ฆฌ

output7 2021. 12. 31. 11:36

input type ๊ฐ„๋‹จ ์ •๋ฆฌ

  • <input type="text">
  • <input type="email">
  • <input type="password">
  • <input type="radio">
  • <input type="file">
  • <input type="checkbox">
  • <input type="submit">
  • <select>
      <option>์˜ต์…˜1</option>
    </select>
  • <textarea></textarea>

input ์†์„ฑ ๊ฐ„๋‹จ ์ •๋ฆฌ

  • placeholder: ๋ฐฐ๊ฒฝ ๊ธ€์ž
  • value: ๋ฏธ๋ฆฌ ์ž…๋ ฅ๋œ ๊ฐ’
  • name: ์ธํ’‹์˜ ์ด๋ฆ„ ์„ค์ •

input type์„ ์ด์šฉํ•œ CSS์…€๋ ‰ํ„ฐ

  • ex) input[type=email] {}

์ „์†ก๋ฒ„ํŠผ (form ํƒœ๊ทธ ์•ˆ์— ์žˆ์–ด์•ผ ์ž˜ ์ž‘๋™ํ•จ)

  • <button type="submit">์ „์†ก</button>
  • <input type="submit">

label ํƒœ๊ทธ์™€ for ์†์„ฑ

  • input์˜ id์™€ label์˜ for ์†์„ฑ์„ ๋˜‘๊ฐ™์ด ๋งž์ถฐ์ฃผ๋ฉด input๋Œ€์‹  label์„ ๋ˆŒ๋Ÿฌ๋„ input์„ ์„ ํƒํ•  ์ˆ˜ ์žˆ์Œ
<div class="preference">
    <label for="cheese">Do you like cheese?</label>
    <input type="checkbox" name="cheese" id="cheese">
</div>

 

'๐ŸŽจ CSS ๐Ÿ”ป' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

Pseudo-class ์…€๋ ‰ํ„ฐ  (0) 2021.12.31
CSS nth-child ์…€๋ ‰ํ„ฐ  (0) 2021.12.31
์ธ๋ผ์ธ๋ธ”๋ก(inline-block) margin ์ œ๊ฑฐ  (0) 2021.12.29
::before ::after ๊ฐ€์ƒํด๋ž˜์Šค  (0) 2021.12.29
CSS position  (0) 2021.12.29