Floating and positioning of css boxes

1. Box float float

Float property:

The default is none, which is positioned according to the standard stream;

Left: left suspension;

Right: right suspension;

 

2. Use clear to clear the floating effect

Clear property:

The default is none, which allows floating objects on both sides;

Left: Disallow floating objects on the left

Right: Do not allow floating objects on the right

Both: floating objects are not allowed

 

3. Box positioning position

Position property:

The default is static, which is positioned according to the standard stream;

Relative: Relative positioning, offset the specified distance from the original standard position;

Absolute: Absolute positioning, offset based on its containing box;

Fixed: fixed positioning, based on the browser window for positioning;

 

4. z-index spatial position

Z-index space position, the default is 0, the page with a large z-index value is located above its small value;

 

5. Box display property

Display:

Inline: Turn the element into an inline element;

Block: Turn the element into a block-level element;

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326921141&siteId=291194637