Home  >  Article  >  Web Front-end  >  What are the values ​​of the display attribute in css? What is the role of each?

What are the values ​​of the display attribute in css? What is the role of each?

王林
王林forward
2020-07-31 16:21:218127browse

What are the values ​​of the display attribute in css? What is the role of each?

display attribute value introduction:

(recommended tutorial: css quick start)

  • ##none This element will not be displayed.

  • block This element will be displayed as a block-level element, with line breaks before and after this element.

  • inline Default. This element will be displayed as an inline element with no line breaks before or after the element.

  • #inline-block Inline block element. (New value in CSS2.1)

  • list-item This element will be displayed as a list.

  • run-in This element will be displayed as a block-level element or an inline element depending on the context.

  • compact There is a value compact in CSS, but it has been removed from CSS2.1 due to lack of widespread support.

  • #marker There is a value marker in CSS, but it has been removed from CSS2.1 due to lack of widespread support.

  • ##table This element will be displayed as a block-level table (similar to ), with line breaks before and after the table.
  • inline-table This element will be displayed as an inline table (similar to
    ), with no line breaks before and after the table.
  • table-row-group This element will be displayed as a group of one or more rows (similar to ).
  • table-header-group This element will be displayed as a group of one or more rows (similar to ).
  • (Video tutorial recommendation: css video tutorial

    )

      table-footer-group This element will be used as a or Display multiple rows in groups (similar to
    ).
  • table-row This element will be displayed as a table row (similar to ).
  • table-column-group This element will be displayed as a group of one or more columns (similar to ).
  • table-column This element will be displayed as a cell column (similar to )
  • table-cell This element will be displayed as A table cell display (similar to
    and )
  • table-caption This element will be displayed as a table title (similar to
    )
  • inherit specifies that the value of the display attribute should be inherited from the parent element.
  • The above is the detailed content of What are the values ​​of the display attribute in css? What is the role of each?. For more information, please follow other related articles on the PHP Chinese website!

    Statement:
    This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete