What are the properties that can and cannot be inherited in CSS?

Source: Internet
Author: User


I. Attributes with no inheritance

1. Display: Specifies the type of box that the element should generate

2. Text properties:

Vertical-align: Vertical Text alignment

Text-decoration: Specifies decorations added to the text

Text-shadow: Text Shadow Effect

White-space: processing of whitespace characters

Unicode-bidi: Setting the direction of text

3. Properties of the box model

width, height, margin, margin-top, Margin-right, Margin-bottom, Margin-left, Border, Border-style, Border-top-style, Border-right-style, Border-bottom-style, Border-left-style, Border-width, Border-top-width, Border-right-right, Border-bottom-width, Border-left-width, Border-color, Border-top-color, Border-right-color, Border-bottom-color, Border-left-color, Border-top, Border-right, Border-bottom, Border-left, padding, padding-top, Padding-right, Padding-bottom, Padding-left

4. Background properties

Background, Background-color, Background-image, Background-repeat, Background-position, background-attachment

5. Positioning properties

Float, clear, position, top, right, bottom, left, Min-width, Min-height, Max-width, max-height, overflow, clip, Z-index

6. Generate Content Properties

Content, Counter-reset, counter-increment

7. Outline Style properties

Outline-style, Outline-width, Outline-color, outline

8. Page style Properties

Size, Page-break-before, Page-break-after

9. Sound style properties

Pause-before, Pause-after, pause, Cue-before, Cue-after, Cue, play-during

Ii. attributes with inheritance

1. Font family Properties

Font: Combining fonts

Font-family: Font family of specified elements

Font-weight: Setting the weight of a font

Font-size: Setting the size of the font

Font-style: Defining the style of the font

Font-variant: Sets the font display text for small caps, which means that all lowercase letters are converted to uppercase, but all letters that use a small uppercase font have a smaller font size than the rest of the text.

Font-stretch: The current font-family is stretched and deformed. All major browsers are not supported.

Font-size-adjust: Specify a aspect value for an element so that the x-height of the preferred font can be maintained.

2. Text Series Properties

Text-indent: Text Indent

Text-align: Horizontal alignment of text

Line-height: Row Height

Word-spacing: Increases or decreases the gap between words (i.e., word spacing)

Letter-spacing: Increase or decrease whitespace between characters (character spacing)

Text-transform: Controlling text capitalization

Direction: The writing direction of the specified text

Color: Text Colors

3. Element visibility

Visibility

4. Table Layout Properties

Caption-side, Border-collapse, border-spacing, Empty-cells, Table-layout

5. List Layout Properties

List-style-type, List-style-image, List-style-position, List-style

6. Generate Content Properties

Quotes

7. Cursor Properties

Cursor

8. Page style Properties

Page, Page-break-inside, Windows, orphans

9. Sound style properties

Speak, Speak-punctuation, Speak-numeral, Speak-header, Speech-rate, volume, voice-family, pitch, pitch-range, stress, Richness, azimuth, elevation

Iii. attributes that all elements can inherit

1. Element visibility

Visibility

2. Cursor Properties

Cursor

Iv. attributes that can be inherited by inline elements

1. Font family Properties

2. Text Series properties except Text-indent, Text-align

V. Attributes that block-level elements can inherit

1, Text-indent, text-align

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.