section is a new tag in HTML5, which represents a document section or section. This tag is used to make the code structure clearer and achieve semantic purposes; display:block; is used to define elements as block elements; block elements The default is to fill the entire line
A method like bootstrap, which uses a container to set the width of the content area, and uses media queries to adapt to the screen. Then the content in the container is divided proportionally using row and col, so the section does not need a width, Another
The other is a full-screen layout, with no container or the container is 100% width A very important point for self-adaptation is not to specify the width of internal elements, because if the width is specified, it cannot be adapted.
Block element width is 100%
section
is a new tag in HTML5, which represents a document section or section. This tag is used to make the code structure clearer and achieve semantic purposes;display:block;
is used to define elements as block elements; block elements The default is to fill the entire lineThere are generally two methods
A method like bootstrap, which uses a container to set the width of the content area, and uses media queries to adapt to the screen. Then the content in the container is divided proportionally using row and col, so the section does not need a width,
Another
The other is a full-screen layout, with no container or the container is 100% width
A very important point for self-adaptation is not to specify the width of internal elements, because if the width is specified, it cannot be adapted.