当面试官问CSS可继承属性有哪些?就这样告诉他:
有继承性
- 字体系列
font、font-family、font-weight、font-size、font-style、font-variant、font-stretch、font-size-adjust - 文本系列
text-indent、text-align、line-height、word-spacing、letter-spacing、text-transform、direction、color - 元素可见性
visibility - 表格布局属性
caption-side、border-collapse、border-spacing、empty-cells、table-layout - 列表布局
list-style-type、list-style-image、list-style-position、list-style - 光标
cursor
无继承性
- 生成内容属性
display。 - 文本属性
vertical-align、text-decoration、text-shadow、white-space、unicode-bidi。 - 盒子模型的属性
width、height、margin、margin-top、margin-right、margin-bottom、margin-left、border、border-style、border-top-style、border-right-style、border-bottom-style、border-left-style、border-width、border-top-width、border-right-right、border-bottom-width、border-left-width、border-color、border-top-color、border-right-color、border-bottom-color、border-left-color、border-top、border-right、border-bottom、border-left、padding、padding-top、padding-right、padding-bottom、padding-left。 - 背景属性
background、background-color、background-image、background-repeat、background-position、background-attachment。 - 定位属性
float、clear、position、top、right、bottom、left、min-width、min-height、max-width、max-height、overflow、clip、z-index。 - 生成内容属性
content、counter-reset、counter-increment。 - 轮廓样式属性
outline-style、outline-width、outline-color、outline。 - 页面样式属性
size、page-break-before、page-break-after。 - 声音样式属性
pause-before、pause-after、pause、cue-before、cue-after、cue、play-during。