CSS 中可继承的属性有哪些

继承就是指子节点默认使用父节点的样式属性。
可以继承的属性很少,只有颜色,文字,字体间距行高对齐方式,和列表的样式可以继承。
  • 所有元素可继承: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。
posted @ 2022-10-03 10:24  天青色等烟雨灬  阅读(360)  评论(0)    收藏  举报