What are the knowledge points of the div+css entry framework?
This article mainly explains "what are the knowledge points of the div+css entry framework?" interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "what are the knowledge points of the div+css entry framework?"
The floating effect of css is reflected by the float property setting, and you will know how to use it after a few tests.
The float attribute setting allows the element that needs to be set to float to follow the specified element.
Take a look at the box model.
The clear attribute sets whether the side of one element allows other floating elements.
Left does not allow floating elements on the left
Right does not allow floating elements on the right
Both does not allow floating elements on the left and right sides.
None defaults. Allow floating elements to appear on both sides.
Let's say you have three div that you want to display as a row.
You will use float
But your fourth div wants to be displayed on the second line.
You will use clear
Clear float
To clear floats is not to clean up their own floating effects, but to remove floats that come into contact with floating elements, so that elements behind floating elements no longer accept their floats and are laid out according to normal element sulfur.