Home >Web Front-end >CSS Tutorial >What is the function of the display:block attribute?

What is the function of the display:block attribute?

hzc
hzcOriginal
2020-06-28 11:10:0620822browse

Display in css is to set the display method of elements. Block is displayed as a block element. Inline is displayed as an inline element. None is not displayed. Block elements will occupy the same space alone. Others Elements on the same line as him will be forced to wrap and squeeze to the next line.

What is the function of the display:block attribute?

display in css is the way to set the element display, block is the way to display the block element , inline is displayed as an inline element, none is not displayed, the block element will occupy the same space alone, and other elements in the same line as it will be forced to wrap and squeeze into Next line.

Recommended tutorial: "css tutorial"

The above is the detailed content of What is the function of the display:block attribute?. 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