What are the values of css display attribute
The values of the css display attribute are: none, block, inline, inline-block, list-item, run-in, compact, marker, table, inline-table, table-cell, inherit, etc.
The operating environment of this tutorial: Windows 7 system, CSS3 version, Dell G3 computer.
The display attribute specifies the type of box the element should generate.
Value of the display attribute
Value | Description | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 appear as a block-level element or an inline element, depending on the context. | ||||||||||||||||||||||
compact | The value compact was present in CSS, but was removed from CSS2.1 due to lack of widespread support. | ||||||||||||||||||||||
marker | There was a value marker in CSS, but it was removed from CSS2.1 due to lack of widespread support. | ||||||||||||||||||||||
table | This element will be displayed as a block-level table (similar to
|