23 lines
		
	
	
		
			672 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			672 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| ---
 | ||
| title: CSS Position
 | ||
| localeTitle: CSS职位
 | ||
| ---
 | ||
| ## CSS职位
 | ||
| 
 | ||
| position属性指定用于元素的定位方法的类型。它有5个关键字值:
 | ||
| 
 | ||
| ```css
 | ||
| .static         { position: static; } // default value 
 | ||
|  .relative       { position: relative; } 
 | ||
|  .sticky         { position: sticky; } 
 | ||
|  .fixed          { position: fixed; } 
 | ||
|  .absolute       { position: absolute; } 
 | ||
| ```
 | ||
| 
 | ||
| ### 更多信息:
 | ||
| 
 | ||
| MDN文档: [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/position)
 | ||
| 
 | ||
| 浏览器支持: [caniuse](http://caniuse.com/#search=position)
 | ||
| 
 | ||
| YouTube: [Part1](https://www.youtube.com/watch?v=kejG8G0dr5U) | [第2部分](https://www.youtube.com/watch?v=Rf6zAP4YnZA) |