CSS可以和不可以繼承的屬性

來源:互聯網
上載者:User
不可繼承的:display、margin、border、padding、background、height、min-height、max-height、width、min-width、max-width、overflow、position、left、right、top、bottom、z-index、float、clear、table-layout、vertical-align、page-break-after、page-bread-before和unicode-bidi。所有元素可繼承: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。表格元素可繼承:border-collapse。 font屬性書寫格式(僅css1)
font : font-style font-variant font-weight font-size line-height font-family;

font屬性預設值
font: normal normal normal medium normal "Times New Roman" ;

相關文章

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.