-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[css] 第108天 position的relative和absolute定位原点是哪里? #1014
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
Comments
absolute: 定位原点为第一个position不为static的父级元素的左上角。 |
position: relative,它偏移的参照位是其原先在正常文档流中的位置; |
单独使用relative 相对于本身偏移,没有脱离文档流 两者一起使用相对于父元素定位 |
简言之,两者的定位原点都是其包含块区域的左上角;只是两种定位元素的包含块有所不同,得出的表明结论就是上述几位所说的。我简单的说一下我对包含块的一些理解: 包含块(
一个元素的包含块完全受其
注: |
|
第108天 position的relative和absolute定位原点是哪里?
The text was updated successfully, but these errors were encountered: