Home >Web Front-end >CSS Tutorial >What is the function of the display:block attribute?
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.
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.
If you use
In this case, if it is not a "block" block, it will only be triggered when the text is clicked. It will not work if the button
display in css is the way to set the display of elements, and block is the way to display a block of elements.
inline is displayed as an inline element, none is not displayed;
The block element will occupy the same space alone, and other elements will be the same as Those on the same line will be forced to wrap and squeeze to the next line, but inline will not do this.
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!