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

最新文章

  1. 重写navigationController的push方法后,出现卡顿现象
  2. ASP.NET WEBAPI 简单CURD综合测试(asp.net MVC,json.net,sql基础存储过程和视图,sqlhelper,json解析)
  3. How to Tune Java Garbage Collection--reference
  4. 帝国cms7.0修改默认搜索模版中的分页[!--show.page--]
  5. 练习—单链表—Swap Nodes in Pairs
  6. Python进阶之返回函数
  7. GDKOI2016
  8. 【转】cookie和session的区别
  9. R语言-混合型数据聚类
  10. Ajax 跨域提交表单
  11. Modelsim独立仿真Vivado Clocking Wizard IP Core
  12. VMWare 安装ubuntu,虚机设置静态IP接入公网
  13. hdu1005 Number Sequence---找循环节
  14. cmd命令中运行pytest命令导入模块报错解决方法
  15. python3.7 打包成exe程序(只需两行命令)
  16. 当一些库和类无法在Silverlight工程中使用
  17. linux学习笔记 apache php mysql +linux
  18. bzoj 2243: [SDOI2011]染色 线段树区间合并+树链剖分
  19. 6.5 开始进入设计 … Transition to Design
  20. Uedit编辑器编辑Velocity

热门文章

  1. JavaScript之引用类型讲解
  2. p3p之讲解
  3. 动态调用WCF服务
  4. 使用WCF服务的客户端出现maxReceivedMessageSize异常
  5. asp.net MVC3 + JQuery 的ajax简单使用
  6. ID3决策树---Java
  7. PHP7安装笔记
  8. codeforces 430A Points and Segments (easy)(理解能力有待提高……)
  9. HDU 1788 Chinese remainder theorem again
  10. ExtJs布局之Column