CSS中可继承的属性

html-css014

CSS中可继承的属性,第1张

所有元素可继承 :visibility(可见性)和 cursor (光标属性)

内联元素可继承 :font、font-size、font-family、font-style、font-variant、font-weight、text-decoration、text-align、letter-spacing、word-spacing、white-space、line-height、color、

块级元素可以继承的属性 :text-indent、text-align、

列表元素可继承 :list-style、list-style-type、list-style-position、list-style-image、

您好,

不可继承的:display、margin、border、padding、background、height、min-height、max- height、width、min-width、max-width、overflow、position、left、right、top、 bottom、z-index、float、clear、table-layout、vertical-align、page-break-after、 page-bread-before和unicode-bidi。

所有元素可继承:visibility和cursor。

内联元素可继承:letter-spacing、word-spacing、white-space、line-height、color、font、 font-family、font-size、font-style、font-variant、font-weight、text- decoration、text-transform、direction。

块状元素可继承:text-indent和text-align。

列表元素可继承:list-style、list-style-type、list-style-position、list-style-image。

表格元素可继承:border-collapse。

可继承就是父节点设置了这个属性后,子节点就可以继承他的属性