We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
为默认值,指示元素出现在正常的文档流中;
相对于该元素在文档流中的正常位置进行偏移定位,原占位仍保留(即不脱离文档流)。
相对于static定位以外的最邻近父级元素进行偏移定位,即相对于其直接父级元素。注意:脱离了文档流
相对于浏览器窗口进行定位,即固定定位是以浏览器窗口的最左上点作为基点进行偏移定位的。其位置随时跟随浏览器大小的变化而移动,因此应用得很少。主要运行于浏览器窗口的贴边定位。绝对定位(absolute)同样可以应用在固定定位的框架层里面。
position:relative和position:fixed的结合体——当元素在屏幕内,表现为relative,就要滚出显示器屏幕的时候,表现为fixed。
注意事项:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
position
static
为默认值,指示元素出现在正常的文档流中;
相对定位(relative)
相对于该元素在文档流中的正常位置进行偏移定位,原占位仍保留(即不脱离文档流)。
绝对定位(absolute)
相对于static定位以外的最邻近父级元素进行偏移定位,即相对于其直接父级元素。注意:脱离了文档流
固定定位(fixed)
相对于浏览器窗口进行定位,即固定定位是以浏览器窗口的最左上点作为基点进行偏移定位的。其位置随时跟随浏览器大小的变化而移动,因此应用得很少。主要运行于浏览器窗口的贴边定位。绝对定位(absolute)同样可以应用在固定定位的框架层里面。
粘性定位(sticky)
position:relative和position:fixed的结合体——当元素在屏幕内,表现为relative,就要滚出显示器屏幕的时候,表现为fixed。
注意事项:
The text was updated successfully, but these errors were encountered: