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;
相关推荐
-
PHP8种变量类型的详细讲解2025-02-22 00:32:24
-
php+apache 和 php+nginx的区别2025-02-22 00:21:27
-
PHP:与workerman结合实现定时任务2025-02-22 00:15:57
-
Nginx的Rewrite规则与实例2025-02-22 00:15:39
-
MySql中身份证字段的简单脱敏介绍2025-02-22 00:15:36