Skip to content
New issue

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

[html] 第351天 你知道什么是粘性布局吗? #2176

Open
haizhilin2013 opened this issue Mar 31, 2020 · 2 comments
Open

[html] 第351天 你知道什么是粘性布局吗? #2176

haizhilin2013 opened this issue Mar 31, 2020 · 2 comments
Labels
html html

Comments

@haizhilin2013
Copy link
Collaborator

第351天 你知道什么是粘性布局吗?

我也要出题

@haizhilin2013 haizhilin2013 added the html html label Mar 31, 2020
@amyhuangxbd
Copy link

MDN 是这样解释的:

Sticky positioning can be thought of as a hybrid of relative and fixed positioning. A stickily positioned element is treated as relatively positioned until it crosses a specified threshold, at which point it is treated as fixed until it reaches the boundary of its parent.

中文大概意思:
对象在常态时遵循常规流。它就像是relative和fixed的合体,当在屏幕中时按常规流排版,当卷动到屏幕外时则表现如fixed。该属性的表现是现实中你见到的吸附效果。

image

@rachelcdev
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
html html
Projects
None yet
Development

No branches or pull requests

3 participants