Home  >  Article  >  Web Front-end  >  What does css both mean?

What does css both mean?

藏色散人
藏色散人Original
2023-01-31 09:13:351626browse

css both means setting the clear attribute value to both. Its function is to clear the float, that is, the top border of the box is required to be lower than the bottom margin of any floating box previously generated in the source document. In other words, the impact of all previous floating boxes can be cleared.

What does css both mean?

The operating environment of this tutorial: Windows 10 system, CSS3 version, DELL G3 computer

What does css both mean?

clear: both basic principles of clearing floats

clear attribute

Regarding the clear attribute, the official document describes it like this:

What does css both mean?

Where clear: both means that the top border edge of the box is required to be lower than the bottom margin edge of any floating box previously generated in the source document. In other words, the impact of all previous floating boxes can be cleared.

Use an empty block element with the clear:both attribute to open the box of the parent element. This is the core idea of ​​the additional tag method, single pseudo-element method and double pseudo-element method to clear floats.

Recommended learning: "css video tutorial"

The above is the detailed content of What does css both mean?. 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