position: relative;
时间: 2024-02-06 12:04:26 浏览: 14
The CSS property `position: relative;` sets an element's position relative to its normal position in the document flow. This means that the element will still take up space in the document flow, but its position can be adjusted using other positioning properties such as `top`, `bottom`, `left`, and `right`.
When an element is positioned relatively, its position is calculated based on its current position in the document flow, so if it is moved using the `top`, `bottom`, `left`, or `right` properties, it will move relative to its original position.
This property is often used in conjunction with other positioning properties to create more dynamic layouts and positioning effects on a page.
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)