相对位置和绝对位置的区别在于CSS 例如 。风格 { 职位:相对;
.style { position:absolute;
最佳答案
来自 W3schools :
Absolute
Generates an absolutely positioned element, positioned relative to the first parent element that has a position other than static. The element's position is specified with the "left", "top", "right", and "bottom" properties
Relative
Generates a relatively positioned element, positioned relative to its normal position, so "left:20" adds 20 pixels to the element's LEFT position
同时检查 this page ,它将为您提供有关 CSS 位置的非常好的概述。
关于css - 在 CSS 中的位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2942389/