CSS 中哪些属性可继承,哪些不可以?(必会)
能继承的属性
1.字体系列属性:font、font-family、font-weight、font-size、font-style;
2.文本系列属性:
(2.1)内联元素:color、line-height、word-spacing、letter-spacing、text-transform;
(2.2)块级元素:text-indent、text-align;
3.元素可见性:visibility
4.表格布局属性:caption-side、border-collapse、border-spacing、empty-cells、table-layout;
5.列表布局属性:list-style
不能继承的属性
1.display:规定元素应该生成的框的类型;
2.文本属性:vertical-align、text-decoration;
3.盒子模型的属性:width、height、margin 、border、padding;
4.背景属性:background、background-color、background-image;
5.定位属性:float、clear、position、top、right、bottom、left、min-width、
min-height、max-width、max-height、overflow、clip;
相关推荐
-
DBA技术分享(一)-MYSQL常用查询Databases和tables
DBA技术分享(一)-MYSQL常用查询Databases和tables2025-04-27 02:23:34 -
SEO应用之PHP随机输出数组多个值2025-04-27 01:31:39
-
Hbase和MySQL的区别是什么?2025-04-27 01:13:13
-
PHP中异步执行http请求(Guzzle And Curl)
PHP中异步执行http请求(Guzzle And Curl)2025-04-27 00:21:51 -
| PHP 求2个日期相差天数,兼容性好错误率低,收藏了2025-04-27 00:15:34