small grammatical change/clarification (#20961)
* small grammatical change/clarification * Fix formatting
This commit is contained in:
committed by
Huyen Nguyen
parent
0e80d750a3
commit
7c3bee2034
@@ -5,9 +5,9 @@ title: Fonts
|
|||||||
The CSS font properties define the font family, weight, size, variant, line height and style of a text.
|
The CSS font properties define the font family, weight, size, variant, line height and style of a text.
|
||||||
|
|
||||||
### Font family
|
### Font family
|
||||||
The font family of a text is simply set by using the `font-family` property.
|
The font family of a text is set by using the `font-family` property.
|
||||||
|
|
||||||
It works with a *fallback* system, if your browser does not support the first font, it tries with the next one and so on. If the name of the font is more than one word it must be surrounded by quotes.
|
It works with a *fallback* system, meaning if your browser does not support the first font, it tries with the next one and so on. If the name of the font is more than one word it must be surrounded by quotes.
|
||||||
|
|
||||||
```css
|
```css
|
||||||
p {
|
p {
|
||||||
@@ -80,13 +80,14 @@ p {
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Font responsiveness
|
### Font responsiveness
|
||||||
The text size can be set with a vw(viewport width) unit.
|
The text size can be set with a `vw` (viewport width) unit.
|
||||||
That way the text size will follow the size of the browser window.
|
This will allow the text to adjust to the size of the browser window.
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<h1 style="font-size: 10vw">Hello World</h1>
|
<h1 style="font-size: 10vw">Hello World</h1>
|
||||||
```
|
```
|
||||||
`Viewport is the browser window size. 1vw = 1% of viewport width. If the viewport is 50cm wide, 1vw is 0.5cm.`
|
|
||||||
|
Viewport is the browser window size. 1vw = 1% of viewport width. If the viewport is 50cm wide, 1vw is 0.5cm.
|
||||||
|
|
||||||
### Font variant
|
### Font variant
|
||||||
The `font-variant` property specifies if a text should be displayed in a small-caps font (where all lowercase letters are converted to uppercase letters while appearing in a smaller font-size than the original uppercase letters in the text).
|
The `font-variant` property specifies if a text should be displayed in a small-caps font (where all lowercase letters are converted to uppercase letters while appearing in a smaller font-size than the original uppercase letters in the text).
|
||||||
|
Reference in New Issue
Block a user