๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๊ฐœ์ธ๊ณต๋ถ€/HTML5 + CSS3

[HTML+CSS][ํผ ๊ด€๋ จ ํƒœ๊ทธ๋“ค] 05 - ๋‹ค์–‘ํ•œ ํผ ์š”์†Œ๋“ค

by ๐Ÿ‡๋ฐ•๋ด‰๋ด‰๐Ÿ‡ 2020. 6. 20.

 

 

 

[HTML+CSS][ํผ ๊ด€๋ จ ํƒœ๊ทธ๋“ค] 04 - ์—ฌ๋Ÿฌ ๋ฐ์ดํ„ฐ ๋‚˜์—ดํ•ด ๋ณด์—ฌ์ฃผ๊ธฐ

ํƒœ๊ทธ์˜ ๋‹ค์–‘ํ•œ ์†์„ฑ" data-og-description="ํƒœ๊ทธ" data-og-description="[HTML+CSS][ํผ ๊ด€๋ จ ํƒœ๊ทธ๋“ค] 01 - ํผ(form) [HTML+CSS] [์ด๋ฏธ์ง€์™€ ํ•˜์ดํผ๋งํฌ] 03 - SVG ์ด๋ฏธ์ง€ [HTML+CSS] [์ด๋ฏธ์ง€์™€ ํ•˜์ดํผ๋งํฌ] 02 - ๋ง..

onelight-stay.tistory.com

 

์•ž ์ „์— ๋ฐฐ์šด ํผ๋“ค๊ณผ ๋”๋ถˆ์–ด ๋”์šฑ ๋‹ค์–‘ํ•œ ํผ ์š”์†Œ๋“ค์— ๋Œ€ํ•ด ์•Œ์•„๋ณด์ž.

 

 


 

 

<button> - ๋ฒ„ํŠผ

 

<input> ํƒœ๊ทธ์—์„œ๋„ ๋ฒ„ํŠผ์„ ๋„ฃ์„ ์ˆ˜ ์žˆ์ง€๋งŒ <button> ํƒœ๊ทธ๋ฅผ ์‚ฌ์šฉํ•ด ๋ฒ„ํŠผ์„ ์‚ฝ์ž…ํ•  ์ˆ˜ ์žˆ๋‹ค.

 

<input>๊ณผ์˜ ์ฐจ์ด์ ์€ <button>์€ ํƒœ๊ทธ ์ž์ฒด์—์„œ ์—ญํ• ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๊ธฐ ๋•Œ๋ฌธ์—

ํ™”๋ฉด ๋‚ญ๋…๊ธฐ์—์„œ ๋ฒ„ํŠผ์ด ์žˆ๋‹ค๋Š” ๊ฒƒ์„ ์ •ํ™•ํ•˜๊ฒŒ ์ „๋‹ฌํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ,

๋ฒ„ํŠผ์— ์•„์ด์ฝ˜๊ณผ ๋””์ž์ธ์„ ๋ฐ”๊ฟ€ ์ˆ˜ ์žˆ๋Š” CSS๋ฅผ ์‚ฌ์šฉํ•ด ์›ํ•˜๋Š” ํ˜•ํƒœ๋กœ ๋ฐ”๊ฟ€ ์ˆ˜ ์žˆ๋‹ค.

 

 

    <form>
        <h1>๋ฒ„ํŠผ ์‚ฝ์ž…</h1>
        <button type="submit">
            <img src="images/tick.png" alt="button insert">๋ฒ„ํŠผ ์‚ฝ์ž…ํ•˜๊ธฐ
        </button>
    </form>

 

 


 

 

<output> - ๊ณ„์‚ฐ ๊ฒฐ๊ณผ

 

์ž…๋ ฅํ•˜๋Š” ๊ฐ’์ด ์ผ๋ฐ˜ ํ…์ŠคํŠธ๊ฐ€ ์•„๋‹Œ ๊ณ„์‚ฐ ๊ฒฐ๊ณผ๋ผ๋Š” ๊ฒƒ์„ ๋ธŒ๋ผ์šฐ์ €์—๊ฒŒ ์•Œ๋ ค์ค€๋‹ค.

 

 

    <form oninput="result.value=parseInt(num1.value)+parseInt(num2.value)">
        <h1>๊ฒฐ๊ณผ๊ฐ’ ์ง€์ •</h1>
        <input type="number" name="num1" value="0">
        +<input type="number" name="num2" value="0">
        =<output name="result" for="num"></output>
    </form>

 

 


 

 

<progress> - ์ง„ํ–‰์ƒํƒœ ๋ณด์—ฌ์ฃผ๊ธฐ

 

์ž‘์—…์˜ ์ง„ํ–‰ ์ƒํƒœ๋ฅผ ๋‚˜ํƒ€๋‚ผ ๋•Œ ์‚ฌ์šฉํ•œ๋‹ค.

 

 

<meter> - ๊ฐ’์ด ์ฐจ์ง€ํ•˜๋Š” ํฌ๊ธฐ ํ‘œ์‹œํ•˜๊ธฐ

 

<progress>์™€ ๋น„์Šทํ•˜๋‚˜ <meter>๋Š” ์ „์ฒด ํฌ๊ธฐ ์ค‘์—์„œ

์–ผ๋งˆ๋‚˜ ์ฐจ์ง€ํ•˜๋Š” ์ง€๋ฅผ ํ‘œํ˜„ํ•  ๋•Œ ์‚ฌ์šฉํ•œ๋‹ค.

 

 

    <form>
        <h1>์ง„ํ–‰์ƒํƒœ ๋ง‰๋Œ€ ์‚ฝ์ž…</h1>
        <ul>
            <li>
                <label>10์ดˆ ๋‚จ์Œ</label>
                <progress value="50" max="60"></progress>
            </li>
            <li>
                <label>์ง„ํ–‰๋ฅ  30%</label>
                <progress value="30" max="100"></progress>
            </li>
        </ul>
    </form>
    <br>
    <hr>
    <form>
        <h1>์ „์ฒด ํฌ๊ธฐ ์ค‘ ์ฐจ์ง€ํ•˜๋Š” ํฌ๊ธฐ ์‚ฝ์ž…</h1>
        <ul>
            <li>
                <label>์ ์œ ์œจ 0.8</label>
                <meter value="0.8"></meter>
            </li>
            <li>
                <label>์‚ฌ์šฉ๋Ÿ‰ 64%</label>
                <meter min="0" max="100" value="64"></meter>
            </li>
            <li>
                <label>ํŠธ๋ž™ํ”ฝ ์ดˆ๊ณผ</label>
                <meter min="1024" max="10240" low="2048" high="8192" value="9216"></meter>
            </li>
            <li>
                <label>์ ์ ˆํ•œ ํŠธ๋ž˜ํ”ฝ</label>
                <meter value="0.5" optimum="0.8"></meter>
            </li>
        </ul>
    </form>

 

 


 

 

meter์™€ progress๊ฐ€ ๋งค์šฐ ๋น„์Šทํ•ด์„œ ์กฐ๊ธˆ ํ—ท๊ฐˆ๋ฆฐ๋‹ค.

 

์˜๋ฏธ๋ฅผ ์ •ํ™•ํžˆ ํŒŒ์•…ํ•˜๊ณ  ์‰ฝ๊ฒŒ ๊ตฌ๋ถ„ํ•˜๋„๋ก ์—ด์‹ฌํžˆ ํ•˜์ž.

 

 


 

 

< ์ฐธ๊ณ  >

Do it! HTML5+CSS3 ์›น ํ‘œ์ค€์˜ ์ •์„

 

 

โ€ป ํ•ด๋‹น ๊ธ€์€ ์Šต๋“ ๋ชฉ์ ์œผ๋กœ ์ž‘์„ฑ๋œ ๊ธ€์ž…๋‹ˆ๋‹ค โ€ป

 

๋ฐ˜์‘ํ˜•

๋Œ“๊ธ€