哪些CSS属性是继承的? [英] Which CSS properties are inherited?

查看:93
本文介绍了哪些CSS属性是继承的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到一些属性在CSS中继承,有些属性不是。例如,text-size属性是继承的,但填充和边距不会被子块继承。那么如何确定哪些属性是继承的,哪些不是?

I've noticed that some properties are inherited in CSS, and some are not. For example, the text-size property is inherited, but the padding and margin are not inherited by the child blocks. So how to figure out which properties are inherited, and which are not?

推荐答案

http://www.w3.org/TR/CSS21/propidx.html\"> W3C的资讯,因此我猜测应该 是否正确。但是,知道网络浏览器(特别是IE),其中一些可能不被所有浏览器继承:

I'm working with W3C's information, so I'd guess it should be correct. But knowing web browsers (IE specifically), some of these might not be inherited by all browsers:


  1. / code>

  2. border-collapse

  3. border-spacing

  4. 字幕端

  5. color

  6. 游标

  7. 方向

  8. 高程

  9. empty-cells

  10. font-family
  11. li> font-size
  12. font-style

  13. font-variant

  14. font-weight / li>
  15. 字体

  16. >

  17. line-height

  18. list-style-image

  19. list-style-position

  20. list-style-type

  21. list-style

  22. 孤儿

  23. pitch-range

  24. pitch

  25. 报价

  26. richness

  27. speak-header

  28. 符号

  29. 标点符号

  30. 说话

  31. 语速

  32. stress

  33. text-align

  34. text-indent
  35. 转换

  36. 可见性

  37. 语音家庭

  38. 音量

  39. 白色空间

  40. widows

  41. word-spacing

  1. azimuth
  2. border-collapse
  3. border-spacing
  4. caption-side
  5. color
  6. cursor
  7. direction
  8. elevation
  9. empty-cells
  10. font-family
  11. font-size
  12. font-style
  13. font-variant
  14. font-weight
  15. font
  16. letter-spacing
  17. line-height
  18. list-style-image
  19. list-style-position
  20. list-style-type
  21. list-style
  22. orphans
  23. pitch-range
  24. pitch
  25. quotes
  26. richness
  27. speak-header
  28. speak-numeral
  29. speak-punctuation
  30. speak
  31. speech-rate
  32. stress
  33. text-align
  34. text-indent
  35. text-transform
  36. visibility
  37. voice-family
  38. volume
  39. white-space
  40. widows
  41. word-spacing

这篇关于哪些CSS属性是继承的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆