Home >Web Front-end >CSS Tutorial >What categories can css attributes be divided into?

What categories can css attributes be divided into?

王林
王林Original
2020-11-19 11:32:553720browse

CSS properties can be divided into two categories: inheritable properties and non-inheritable properties. Inheritable attributes include: visibility, cursor, line-height, etc.; non-inheritable attributes include display, margin, border, etc.

What categories can css attributes be divided into?

CSS properties can be divided into two categories based on inheritance, namely: inheritable properties and non-inheritable properties.

(Learning video sharing: css video tutorial)

1. Inheritable attributes

All tags can be inherited:

  • visibility: line height

  • ##cursor

  • ##Inline tags are inheritable:

    line-height: Line height
  • color: Text color
  • font-family: Text font
  • font-size: Text size
  • ##font-weight: Text bold
  • text-decoration: Text underline
  • Block-level tags can be inherited:

text-indent: indent
  • text-aligin: alignment
  • List tags can be inherited:

list-style: list
  • 2. Not inheritable Properties

display, margin, border, padding, background
  • ##height, min-height, max-height, width, min-width, max-width

  • overflow (hide the content of the redundant part of the label), position, left, right, top, bottom, z-index

  • Related recommendations:

    CSS tutorial

The above is the detailed content of What categories can css attributes be divided into?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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