Get the App
SLTechnology News&Howtos  ›  Development  › 

How to clear floats in clear in CSS

Shulou Source: shulou.com Published: 2022-06-03 14:24:17 10月03日 Update

This article mainly shows you "how to remove floats in CSS". The content is simple and clear. I hope it can help you solve your doubts. Let me lead you to study and learn this article "how to remove floats in clear in CSS".

1. Clear in CSS has four parameters:

None: allows both sides to float.

Left: floating on the left is not allowed.

Right: floating on the right is not allowed.

Both (default); floats are not allowed.

2. At first, clear floats in CSS is the default both, that is, there can be no floats at first.

3. Use case: suppose I clear the float of the third DIV

Div {border:1px solid red; float:left; clear:none;} # msg_Div {width:600px; height:600px;} .one {width:100px; height:90px;} .two {width:100px; height:90px;} .three {width:100px; height:90px; clear:left;} .four {width:100px; height:90px;} .five {width:100px Height:90px;}

Effect:

The above is all the contents of the article "how to remove clear floats in CSS". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Floating content article learning help three that is parameters right effect easy to understand more organization case knowledge editing industry information information channel Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn macOS Shulou Technology Redmi Xiaomi