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

What is the function of the display:block attribute?

hzc
hzc Original
2020-06-28 11:10:06 20718browse

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?

displayin css is the way to set the element display,blockis the way to display the block element ,inlineis displayed as an inline element,noneis 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