[Proficient in CSS and HTML design patterns] inheritance relationships neglected in the CSS of Reading Notes

Source: Internet
Author: User

Everyone knows about CSS and inheritance, but they really know what things are and will inherit them, and those will not "inherit the father". Now, let us know .[Xiao HeWe are very grateful to you for pointing out any errors.]

When designing CSS, manyAll attributes can be inherited..

1.Inherited attributes:

>>> Visibility and cursor can beAll element inheritance

>>> The following can only beInline element inheritance: Letter-spacing (In pseudo classes), word-spacing, white-space, line-height, color, [font family] font, font-familly, font-weight, font-size, font-style, font-variant, font-decoration, text-transform, Direction

>>> The following attributes areBlock-level element inheritance: Text-align and text-indent

>>> The following attributes areList element inheritance: List-style, list-style-type, list-style-position, list-style-Image

>>> The following attributes areTable element inheritance: Border-collapse

 

2.Attributes that cannot be inherited

>>> The following attributesCannot be inherited:

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, pager-break-before and Unicode-bidi [we have not seen a few of them here, not much to use.]

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.