CSS中可繼承的屬性

來源:互聯網
上載者:User
這篇文章介紹的內容是CSS中可繼承的屬性 ,有著一定的參考價值,現在分享給大家,有需要的朋友可以參考一下

繼承就是指子節點預設使用父節點的樣式屬性。

不可繼承的屬性太多了不要背,記住可以繼承的屬性有哪些就行了。可以繼承的屬性很少,只有顏色,文字,字型間距行高對齊,和列表的樣式可以繼承。這麼來記很輕鬆的呀!不要被下邊的嚇到了哦~

所有元素可繼承: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。
相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.