interview-answe icon indicating copy to clipboard operation
interview-answe copied to clipboard

210.[CSS]列出 display 的值,说明他们的作用。position 的值,relative 和 absolute 定位原点是?

Open webVueBlog opened this issue 4 years ago • 1 comments

[CSS]

webVueBlog avatar Apr 25 '20 16:04 webVueBlog

  1. block 象块类型元素一样显示。 none 缺省值。向行内元素类型一样显示。 inline-block 象行内元素一样显示,但其内容象块类型元素一样显示。 list-item 象块类型元素一样显示,并添加样式列表标记。 2. position 的值 *absolute 生成绝对定位的元素,相对于 static 定位以外的第一个父元素进行定位。 *fixed (老 IE 不支持) 生成绝对定位的元素,相对于浏览器窗口进行定位。 * relative生成相对定位的元素,相对于其正常位置进行定位。 * static 默认值。没有定位,元素出现在正常的流中 *(忽略 top, bottom, left, right z-index 声明)。 * inherit 规定从父元素继承 position 属性的值。

webVueBlog avatar Apr 25 '20 23:04 webVueBlog