我爱编程

CSS属性继承

2018-04-08  本文已影响0人  蔡森屿

什么是CSS属性继承

一、哪些属性可以继承

1、所有元素可以继承:

visibility和cursor

2、内联元素可继承:

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

3、块状元素可继承:

text-indent和text-align

4、列表元素可继承:

list-style、list-style-type、list-style-position、list-style-image

5、表格元素可继承:

border-collapse

二、不可继承:

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

参考:https://blog.csdn.net/hicoldcat/article/details/64443280

上一篇 下一篇

猜你喜欢

热点阅读