能夠繼承和不能夠繼承的樣式屬性

無繼承性的屬性
1.display:規定元素應該生成的框的類型
2.文本屬性html

  • vertical-align:垂直文本對齊
  • text-decoration:規定添加文本的裝飾
  • text-shadow:文本陰影效果
  • white-space:空白符的處理
  • unicode-bidi:設置文本的方向

3.盒子模型的屬性字體

width;height;margin,margin,margin-top,margin-bottom,margin-right,margin-left;
border,border-style,border-top-stye,border-right-style,border-bottom-style,border-left-style,
border-width,border-top-width,border-bottom-width,border-right-width,border-left-width,
border-color,border-top-color,border-bottom-color,border-left-color,border-right-color,
border-top,border-right,border-bottom,border-left;
padding,padding-top,padding-padding-right,padding-bottom,padding-left;

4.背景屬性
background,background-color,background-image,background-repeat,background-position,background-attachment;
5.定位屬性
float,clear,position,top,right,bottom,left,min-width,min-height,max-width,max-height,overflow,clip,z-index
總結:
能夠繼承的樣式屬性包含(字體系列樣式屬性,文本系列樣式屬性:text-align、line-height、text-indent)
不可繼承的屬性display:inline、block、inline-block、table-cell、none文本類:盒子模型,背景類,浮動類,定位類spa

相關文章
相關標籤/搜索