28 lines
		
	
	
		
			584 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			584 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| ---
 | ||
| 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) |