๐ฉ๐ป๐ป
[HTML/CSS] ์นํ์ด์ง์ ํฐํธ, ์์ด์ฝ ์ถ๊ฐํ๊ธฐ - ๊ตฌ๊ธ ํฐํธ(Google Fonts), Font Awesome ์ฌ์ฉ๋ฒ ๋ณธ๋ฌธ
[HTML/CSS] ์นํ์ด์ง์ ํฐํธ, ์์ด์ฝ ์ถ๊ฐํ๊ธฐ - ๊ตฌ๊ธ ํฐํธ(Google Fonts), Font Awesome ์ฌ์ฉ๋ฒ
tskyoi 2020. 7. 30. 10:04Google Fonts ์ฌ์ฉ๋ฒ
Google Fonts
Making the web more beautiful, fast, and open through great typography
fonts.google.com
1. ํฐํธ ์ ํ
Google Fonts์ ์ ์ํ ํ ๊ฒ์, ์ ๋ ฌ์ ์ด์ฉํ์ฌ ์ฌ์ฉํ ํฐํธ๋ฅผ ์ ํํฉ๋๋ค.
2. ์ํ๋ ์คํ์ผ ์ ํ
์ ๊ณต๋๋ ๋ค์ํ ์คํ์ผ ์ค์์ ์ํ๋ ์คํ์ผ์ ์ผ์ชฝ Select this style์ ํด๋ฆญํ์ฌ ์ถ๊ฐํฉ๋๋ค.
3. ์ฝ๋ ๋ณต์ฌ ๋ฐ ์ ์ฉ
์ผ์ชฝ์ ํ์ ์ฐฝ์ด ๋จ๋ฉด Embed๋ฅผ ํด๋ฆญํ ํ <link> ์๋์ชฝ์ ์ฝ๋๋ฅผ ๋ณต์ฌํฉ๋๋ค. ํ์ ์ฐฝ์ด ๋จ์ง ์์ ๊ฒฝ์ฐ ์ค๋ฅธ์ชฝ ์ About ์์ ์์ด์ฝ์ ํด๋ฆญํ๋ฉด ์ฐฝ์ด ๋ํ๋ฉ๋๋ค.
<head>
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@1,100&display=swap" rel="stylesheet">
</head>
HTML์ head์์ญ์ ๋ณต์ฌํ ์ฝ๋๋ฅผ ๋ถ์ฌ๋ฃ๊ธฐ ํ ํ, ๋ค์ ํ์ ์ฐฝ์์ CSS rules to specify families ์๋์ชฝ์ ์ฝ๋๋ฅผ ๋ณต์ฌํ๊ณ
<style>
body {
font-family: 'Roboto', sans-serif;
}
</style>
body {
font-family: 'Roboto', sans-serif;
}
HTML head ์์ญ์ style ํ๊ทธ ๋ด๋ถ, ๋๋ CSS์์ ํฐํธ๋ฅผ ์ ์ฉํ๊ณ ์ถ์ ์์ญ์ ์ถ๊ฐํด์ฃผ๋ฉด ์นํ์ด์ง์ ํฐํธ๊ฐ ์ ์ฉ๋ฉ๋๋ค.
Font Awesome ์ฌ์ฉ๋ฒ
Font Awesome
The world’s most popular and easiest to use icon set just got an upgrade. More icons. More styles. More Options.
fontawesome.com
1. CDN ์ ์ฉ
Font Awesome ์ฌ์ดํธ์ ์ฒซ ํ๋ฉด์์ Start for Free๋ฅผ ํด๋ฆญํ๊ณ , ์ด๋ฉ์ผ ์ฃผ์๋ฅผ ์์ฑํฉ๋๋ค. ๋ฉ์ผ์ Confirm ๋ฒํผ์ ํด๋ฆญํ๊ณ ๋น๋ฐ๋ฒํธ๋ฅผ ์ค์ ํด์ฃผ๋ฉด ์ฝ๋๊ฐ ์์ฑ๋ฉ๋๋ค.
์ฝ๋ ์ฐ์ธก์ ์๋ Copy Kit Code๋ฅผ ๋๋ฌ ๋ณต์ฌํด์ฃผ๊ณ HTML์ head ์์ญ์ ๋ถ์ฌ๋ฃ์ด ์ค๋๋ค.
<head>
<script src="https://kit.fontawesome.com/d5bfc6e03c.js" crossorigin="anonymous"></script>
</head>
2. ์์ด์ฝ ์ ์ฉ
Icons ๋ฉ๋ด๋ฅผ ํด๋ฆญํ๋ฉด ์ฌ์ฉํ ์ ์๋ ์์ด์ฝ์ ๋ชฉ๋ก์ด ๋ํ๋ฉ๋๋ค. ํ์์ผ๋ก ํ์๋ ์์ด์ฝ์ Pro License๋ฅผ ๊ฐ์ง ์ฌ์ฉ์๋ง ์ด์ฉํ ์ ์์ง๋ง, ๋ฌด๋ฃ ๋ฒ์ ์ผ๋ก๋ ์์ฃผ ๋ง์ ์์ด์ฝ์ ์ด์ฉํ ์ ์์ต๋๋ค.
์ํ๋ ์์ด์ฝ์ ์ ํํ ํ, Copy HTML ์์น์ ์๋ ์ฝ๋๋ฅผ ํด๋ฆญํ๋ฉด ์๋์ผ๋ก ๋ณต์ฌ๋ฉ๋๋ค. ๋ณต์ฌ๋ ์ฝ๋๋ฅผ HTML์ ์์ด์ฝ์ ์ ์ฉํ๊ณ ์ถ์ ์์น์ ๋ถ์ฌ๋ฃ์ผ๋ฉด ์์ด์ฝ์ด ์ ์ฉ๋๋ ๊ฒ์ ๋ณผ ์ ์์ต๋๋ค.
<div>
<i class="fab fa-android"></i>Android
</div>
Font Awesome์ ์์ด์ฝ๋ค์ ํฐํธ์ด๊ธฐ ๋๋ฌธ์ HTML์ Font-style, CSS๋ฅผ ์ ์ฉ์์ผ ์์ด์ฝ์ ํฌ๊ธฐ, ์์์ ๋ฐ๊พธ๊ฑฐ๋ ํ์ ์ํค๊ณ ์ค์ฒฉ์ํฌ ์ ์์ต๋๋ค.
์์ธํ ์ฌ์ฉ๋ฒ์ ์๋์ ๋งํฌ๋ฅผ ์ฐธ์กฐํ์๊ธธ ๋ฐ๋๋๋ค.
1) ํฌ๊ธฐ ๋ณ๊ฒฝ
https://fontawesome.com/how-to-use/on-the-web/styling/sizing-icons
Font Awesome
The world’s most popular and easiest to use icon set just got an upgrade. More icons. More styles. More Options.
fontawesome.com
2) ์์ ๋ณ๊ฒฝ
https://fontawesome.com/how-to-use/on-the-web/styling/sizing-icons
Font Awesome
The world’s most popular and easiest to use icon set just got an upgrade. More icons. More styles. More Options.
fontawesome.com
3) ํ์
https://fontawesome.com/how-to-use/on-the-web/styling/rotating-icons
Font Awesome
The world’s most popular and easiest to use icon set just got an upgrade. More icons. More styles. More Options.
fontawesome.com
4) ์ค์ฒฉ
https://fontawesome.com/how-to-use/on-the-web/styling/stacking-icons
Font Awesome
The world’s most popular and easiest to use icon set just got an upgrade. More icons. More styles. More Options.
fontawesome.com
- 2020/07/30 ์์
'WEB > HTML & CSS' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[CSS] ๋ฏธ๋์ด ์ฟผ๋ฆฌ๋ฅผ ์ด์ฉํ ๋ฐ์ํ ์น ๋ง๋ค๊ธฐ (0) | 2020.06.01 |
---|---|
[CSS] ๊ทธ๋ฆฌ๋ ๋ ์ด์์(Grid Layout) (0) | 2020.05.23 |
[CSS] ๋ฐ์ค ๋ชจ๋ธ ํ ๋๋ฆฌ ๋ง๋ค๊ธฐ (0) | 2020.05.22 |
[CSS] CSS ์ ํ์ ๊ธฐ๋ณธ ์ ๋ฆฌ (0) | 2020.05.20 |
[HTML] ์นํ์ด์ง์ ์ฌ๋ฌ ๊ธฐ๋ฅ์ ์ถ๊ฐํ ์ ์๋ ์ฌ์ดํธ ์ ๋ฆฌ (0) | 2020.05.13 |