您的位置:首页 > Web前端 > CSS

css inherit

2020-02-03 02:43 791 查看
结论:大多数属性都不可继承(基本上适用于当前元素的设定  根据常识可以推出)
可继承的,多数涉及到全局单位,如字体,光标,列表的子属性,文本的属性。

不可继承的: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

转载于:https://www.cnblogs.com/ZackBee/p/6746962.html

  • 点赞
  • 收藏
  • 分享
  • 文章举报
anwuhuan8712 发布了0 篇原创文章 · 获赞 0 · 访问量 78 私信 关注
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: