19 lines
803 B
Markdown
19 lines
803 B
Markdown
---
|
||
title: The Position Property
|
||
localeTitle: 职位属性
|
||
---
|
||
## 职位属性
|
||
|
||
position属性指定用于元素的定位方法的类型(静态,相对,固定,绝对或粘性)。 position属性指定用于元素的定位方法的类型。 position proprty通常不用于创建布局,而是用于定位以某种方式从页面流中突出的元素。
|
||
|
||
有五种不同的头寸值:
|
||
|
||
* 静态的
|
||
* 相对的
|
||
* 固定
|
||
* 绝对
|
||
* 黏 然后使用top,bottom,left和right属性定位元素。但是,除非首先设置position属性,否则这些属性将不起作用。它们的工作方式也取决于位置值。
|
||
|
||
#### 更多信息:
|
||
|
||
[这是一篇很好的文章,](https://www.w3schools.com/css/css_positioning.asp)可以阅读以了解有关position属性的更多信息。 |