Skip to content

Commit 27fe94a

Browse files
committed
Add the "CSS: Fonts" page.
1 parent 920a018 commit 27fe94a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

content/notes/CSS_Fonts.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
+++
2+
title = "CSS: Fonts"
3+
+++
4+
5+
Here's an example of adding a local font to a CSS stylesheet:
6+
7+
```css
8+
@font-face {
9+
font-family: Font, serif;
10+
font-weight: 400;
11+
font-style: normal;
12+
src: url("fonts/font.woff2");
13+
}
14+
```
15+
16+
Note the usage of the [`url()`](https://developer.mozilla.org/en-US/docs/Web/CSS/url_function) function. This allows us to specify the path to the font that is relative to the URL of the stylesheet.

0 commit comments

Comments
 (0)