Files
freeCodeCamp/guide/russian/css/text/index.md
2018-10-16 21:32:40 +05:30

66 lines
2.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: Text
localeTitle: Текст
---
## Текст
CSS предоставляет несколько свойств, чтобы изменить внешний вид текста. Ниже описаны различные текстовые свойства.
#### Цвет текста
\`\` \`html
Это пример свойства текста CSS.
```
``` css
p {
color:red;
}
```
В приведенном выше примере `color` текста элемента `<p>` изменяется на красный. Вы также можете указать цвет как значения RGB, значения HLS и шестнадцатеричные коды (для получения дополнительной информации о цветах щелкните [здесь](https://guide.freecodecamp.org/css/colors) ).
#### Выравнивание текста
Свойство `text-align` используется для установки горизонтального выравнивания текста. Он может принимать значения `left` , `right` , в `center` и `justify` . \`\` \`css п { text-align: center; }
```
Here the text is aligned to the `center` ([example](https://www.w3schools.com/css/tryit.asp?filename=trycss_text-align)).When `text-align` is set to `justify`,each line is stretched so that every line has equal width, and the left and right margins are straight ([example](https://www.w3schools.com/css/tryit.asp?filename=trycss_text-align_all)).
#### Text Decoration
```
CSS п { text-decoration: подчеркивание; }
```
The `text-decoration` property is used to set or remove decorations from text. The value `text-decoration: none;` is often used to remove underlines from links. Other `text-decorations` include `overline`,`line-through`,and `underline` ([example](https://www.w3schools.com/css/tryit.asp?filename=trycss_text-decoration)).
#### Text Tranformation
```
CSS п { text-transform: капитализировать; }
```
The `text-transform` property is used to convert the entire text to `uppercase`,`lowercase` or to `capitilize` each word([example](https://www.w3schools.com/css/tryit.asp?filename=trycss_text-transform)).
#### Letter Spacing
The `letter-spacing` property sets the space between characters in a text.
```
CSS п { расстояние между буквами: 5 пикселей; }
```
#### Line Height
The `line-height` property sets the space between two lines of text.
```
CSS п { line-height: 5px; }
```
#### Word Spacing
The `word-spacing` sets the space between words in a text.
```
CSS п { слово-интервал: 5 пикселей; } \`\` \`
#### Дополнительная информация:
[Текст CSS W3Schools](https://w3schools.com/css/css_text.asp)