下面不可以继承的属性有哪些?
A. font-size B. background C. color D. cursor
答案: B
解析:
默认继承的 ("Inherited: Yes") 的属性:
- 所有元素默认继承:visibility、cursor
- 文本属性默认继承:letter-spacing、word-spacing、white-space、line-height、color、font、 font-family、font-size、font-style、font-variant、font-weight、text-indent、text-align、text-shadow、text-transform、direction
- 列表元素默认继承:list-style、list-style-type、list-style-position、list-style-image
- 表格元素默认继承:border-collapse
默认不继承的("Inherited: No") 的属性:
- 所有元素默认不继承:all、display、overflow、contain
- 文本属性默认不继承:vertical-align、text-decoration、text-overflow
- 盒子属性默认不继承:width、height、padding、margin、border、min-width、min-height、max-width、max-height
- 背景属性默认不继承:background、background-color、background-image、background-repeat、background-position、background-attachment
- 定位属性默认不继承:float、clear、position、top、right、bottom、left、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