Home > Web Front-end > Front-end Q&A > What are the properties of css that do not inherit from the parent class?

What are the properties of css that do not inherit from the parent class?

青灯夜游
Release: 2023-01-07 11:45:08
Original
4304 people have browsed it

CSS attributes that do not inherit from the parent class include: display, width, height, margin, border, float, clear, position, top, right, bottom, left, background, content, size, etc.

What are the properties of css that do not inherit from the parent class?

The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.

CSS inheritance is a rule that allows styles to be applied not only to a specific html tag element, but also to its descendants; that is: if the CSS style of the superior (parent) is set, the superior (parent) level) and the children below (subordinates) have this style.

The role of css inheritance: set some attributes for the parent element, which can also be used by child elements.

CSS inheritance means that the tags wrapped inside will have the style properties of the outer tags. The most typical application of the inheritance feature is usually used in the style default of the entire web page, and the parts that need to be designated as other styles can be set in individual elements. This feature can provide web designers with more ideal space to play. But at the same time, inheritance also has many rules, which can be confusing when applied.

So what are the properties of css that do not inherit from the parent class?

1. Text attributes:

  • ##vertical-align: vertical text alignment

  • text-decoration: Specifies the decoration added to the text

  • text-shadow: Text shadow effect

  • white-space: White-space processing

  • unicode-bidi: Set the direction of the text

2. display: Specify the type of box that the element should generate

3. Generate content attributes:

content、counter-reset、counter-increment
Copy after login

4. Box model attributes:

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
Copy after login

5. Outline style attributes:

outline-style、outline-width、outline-color、outline
Copy after login

6. Page style attributes:

size、page-break-before、page-break-after
Copy after login

7. Background attribute:

background、background-color、background-image、background-repeat、background-position、background-attachment
Copy after login

8. Positioning attribute:

float、clear、position、top、right、bottom、left、min-width、min-height、max-width、max-height、overflow、clip、z-index
Copy after login

9. Sound style attribute:

pause-before、pause-after、pause、cue-before、cue-after、cue、play-during
Copy after login

(Learning video sharing:

css video Tutorial)

The above is the detailed content of What are the properties of css that do not inherit from the parent class?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template