freeCodeCamp/guide/chinese/css/layout/the-position-property/index.md

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