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

Web/๐Ÿงฉ html + CSS

font ์†์„ฑ

font ์†์„ฑ์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

 

font-family ๊ธ€๊ผด
font-style ์ดํƒค๋ฆญ์ฒด ๋“ฑ์˜ ๊ธ€๊ผด์˜ ์Šคํƒ€์ผ ์ง€์ •
font-size ๊ธ€์ž ํฌ๊ธฐ
font-weight ๊ธ€์ž ๋‘๊ป˜
line-height ์ค„ ๊ฐ„๊ฒฉ

 

1. font-family

font-family ์†์„ฑ๊ฐ’์ด ์—ฌ๋Ÿฌ ๊ฐœ์˜ ๊ธ€๊ผด๋กœ ์„ค์ •๋˜์–ด ์žˆ์œผ๋ฉด, ์›น ๋ธŒ๋ผ์šฐ์ €๋Š” ์œ„์—์„œ๋ถ€ํ„ฐ ์ˆœ์„œ๋Œ€๋กœ ๊ธ€๊ผด์„ ์ฝ์–ด ๋“ค์ž…๋‹ˆ๋‹ค.

๋งŒ์•ฝ ์‚ฌ์šฉ์ž์˜ ์ปดํ“จํ„ฐ์— ์ฒซ ๋ฒˆ์งธ๋กœ ์ฝ์–ด ๋“ค์ธ ๊ธ€๊ผด์ด ์—†์œผ๋ฉด ๋‹ค์Œ ๊ธ€๊ผด์„ ํ™•์ธํ•˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.

 

<style>

    .serif { font-family: "Times New Roman", Times, serif; }
    
</style>

 

 

2. font-style

font-style ์†์„ฑ์€ ์ฃผ๋กœ ์ดํƒค๋ฆญ์ฒด๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉํ•˜๋ฉฐ, ๋‹ค์Œ๊ณผ ๊ฐ™์ด 3๊ฐ€์ง€์˜ ์†์„ฑ๊ฐ’์„ ๊ฐ€์ง‘๋‹ˆ๋‹ค.

 

<style>

    .italic { font-style: italic; }

</style>

 

 

3. font-size

 

font-size ๋Š” ๊ธ€์ž ํฌ๊ธฐ๋ฅผ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค.

 

<style>

    .heading { font-size: 50px; }

</style>

 

 

 

4. font-weight

font-weight ์†์„ฑ์€ ํ…์ŠคํŠธ๋ฅผ ์–ผ๋งˆ๋‚˜ ๋‘๊ป๊ฒŒ ํ‘œํ˜„ํ• ์ง€๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.

 

์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ์†์„ฑ๊ฐ’์—๋Š” lighter, normal, bold, bolder ๋“ฑ์ด ์žˆ์Šต๋‹ˆ๋‹ค.

 

<style>

    .we { font-weight: 600; }
    .bold { font-weight: bold; }

</style>

 

 

5. line-height

line-height ์†์„ฑ์€ ์ค„ ๊ฐ„๊ฒฉ์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.

 

<style>

    .we { line-height: 50%; }

</style>

'Web > ๐Ÿงฉ html + CSS' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

ํฌ๊ธฐ  (0) 2020.11.03
background ์†์„ฑ  (0) 2020.11.03
์ปฌ๋Ÿฌ  (0) 2020.11.03
๊ฒฐํ•ฉ ์„ ํƒ์ž  (0) 2020.11.03
์„ ํƒ์ž  (0) 2020.11.03