css默认被后代inherite的属性列表
2024-10-13 21:42:18
css中的属性大部分都可以被继承,但是也有众多不能被继承,比如display, position,,left,right,top,bottom,float,width,border-color,border-style,text-decoration等不被继承。下面列出能被继承的属性。详细见下面的列表:
http://www.w3.org/TR/CSS21/propidx.html
注意:虽然比如margin,position等默认情况下并不继承,但是如果有必要的话,你可以显式指定我们希望从父元素那里继承这个属性。
比如:
p {margin: inherit; padding: inherit}
上面这段代码就指定p元素继承他的父元素对应的margin和padding.
azimuth
border-collapse
border-spacing
caption-side
color
cursor
direction
elevation
empty-cells
font-family
font-size
font-style,font-weight,font,
letter-spacing,
line-height
list-style-image
list-style-position
list-style
list-style-type
orphans
quotes,
richness
speak-header
text-align
text-indent
text-transformation
visibility,
white-space, z-index
最新文章
- 重写navigationController的push方法后,出现卡顿现象
- ASP.NET WEBAPI 简单CURD综合测试(asp.net MVC,json.net,sql基础存储过程和视图,sqlhelper,json解析)
- How to Tune Java Garbage Collection--reference
- 帝国cms7.0修改默认搜索模版中的分页[!--show.page--]
- 练习—单链表—Swap Nodes in Pairs
- Python进阶之返回函数
- GDKOI2016
- 【转】cookie和session的区别
- R语言-混合型数据聚类
- Ajax 跨域提交表单
- Modelsim独立仿真Vivado Clocking Wizard IP Core
- VMWare 安装ubuntu,虚机设置静态IP接入公网
- hdu1005 Number Sequence---找循环节
- cmd命令中运行pytest命令导入模块报错解决方法
- python3.7 打包成exe程序(只需两行命令)
- 当一些库和类无法在Silverlight工程中使用
- linux学习笔记 apache php mysql +linux
- bzoj 2243: [SDOI2011]染色 线段树区间合并+树链剖分
- 6.5 开始进入设计 … Transition to Design
- Uedit编辑器编辑Velocity