css继承

一,可以继承的

1.字体系列属性:

font-family:字体系列

font-size:字体大小

font-weight:字体粗细

color:文本颜色

text-align:文本对齐方式

2.文本系列:

text-align:文本对齐方式

line-height:行高度

word-spacing:单词之间的间距

letter-spacing:中文或者字母之间的间距

text-transform:控制文本大小写(就是uppercase、lowercase、capitalize这三个)

color:文本颜色

3.元素可见性:

   visibility:控制元素显示隐藏

4、列表布局属性:

list-style:列表风格,包括list-style-type、list-style-image等

所有元素可继承: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

格布局属性:

caption-side、border-collapse、border-spacing、empty-cells、table-layout

1.5 列表属性:

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

1. 6 生成内容属性:

quotes

1.7 光标属性:

cursor

1. 8 页面样式属性:

page、page-break-inside、windows、orphans

1.9 声音样式属性:

speak、speak-punctuation、speak-numeral、speak-header、

speech-rate、volume、voice-family、pitch、pitch-range、

stress、richness、、azimuth、elevation

                           

二,不可被继承的csss属性

1.display:规定元素应该生成的框的类型;

2.文本属性:vertical-align, text-decoration

3.盒子模型的属性:width,height,marigin, border,padding;

4.背景属性:float, clear, position , top ,tight.botton

5.定位属性:float、clear、position、top、right、bottom、left、min-width、min-height、maxwidth、max-height、overflow、clip

本属性:

vertical-align:

text-decoration:

text-shadow:

white-space:

unicode-bidi:

6 .盒子模型的属性:宽度、高度、内外边距、边框等

7. 背景属性:背景图片、颜色、位置等

8. 定位属性:浮动、清除浮动、定位position等

9. 生成内容属性:

content、counter-reset、counter-increment

10. 轮廓样式属性:

outline-style、outline-width、outline-color、outline

11. 页面样式属性:

size、page-break-before、page-break-after

继承中比较特殊的几点

1、a 标签的字体颜色不能被继承

2、h1-h6标签字体的大下也是不能被继承的

因为它们都有一个默认值

  • 3
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值