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

列出display的值,说明他们的作用。position的值, relative和absolute分别是相对于谁进行定位的? #13

Open
Sogrey opened this issue Apr 26, 2019 · 0 comments
Labels

Comments

@Sogrey
Copy link
Owner

Sogrey commented Apr 26, 2019

display的值:

block 象块类型元素一样显示。
inline 缺省值。象行内元素类型一样显示。
inline-block 象行内元素一样显示,但其内容象块类型元素一样显示。
list-item 象块类型元素一样显示,并添加样式列表标记。

position的值:

absolute 生成绝对定位的元素,相对于 static 定位以外的第一个祖先元素进行定位。
fixed (老IE不支持) 生成绝对定位的元素,相对于浏览器窗口进行定位。
relative 生成相对定位的元素,相对于其在普通流中的位置进行定位。
static 默认值。没有定位,元素出现在正常的流中*(忽略 top, bottom, left, right z-index 声明)。
inherit 规定从父元素继承 position 属性的值。

@Sogrey Sogrey added the css label Apr 26, 2019
@Sogrey Sogrey added this to css in Web面经题 Sep 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

1 participant