freeCodeCamp/guide/chinese/css/text-indent/index.md

28 lines
584 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
title: Text Indent
localeTitle: 文字缩进
---
## 文字缩进
此CSS属性在文本块中创建第一行的缩进。
### 价值观:
可以使用`%` `px` `em`或测量单位(如`cm`和`in`指定`text-indent`属性。
例如:
* `text-indent: 20%;`
* `text-indent: 15px;`
* `text-indent: 5em;`
* `text-indent: 2in;`
`text-indent`属性也可以使用`inherit`值从其父元素`inherit` 。
例如:
* `text-indent: inherit;`
#### 更多信息:
* [MDN Web Docs - CSS text-indent](https://developer.mozilla.org/en-US/docs/Web/CSS/text-indent)