Layout distal study notes --CSS - layer is positioned

 

1. Overview layer is positioned:

z-index: order of superimposed front and rear

 

 

2.position property:

 

 3.fixed:

 

 

 2.relative:

After moving:

 

static box1 not move up to occupy the position.

3.absolute:

After moving:

static move up to occupy the position of box1.

 

4.relative:

 

box1 relative static positioning.

 

5.absolute:

initial position:

absolute absolute movement relative to the rear:

 

 

 After moving:

 

 6. The general design approach:

Case:

 the difference:

 

1. Overview layer is positioned:

z-index: order of superimposed front and rear

 

 

2.position property:

 

 3.fixed:

 

 

 2.relative:

After moving:

 

static box1 not move up to occupy the position.

3.absolute:

After moving:

static move up to occupy the position of box1.

 

4.relative:

 

box1 relative static positioning.

 

5.absolute:

initial position:

absolute absolute movement relative to the rear:

 

 

 After moving:

 

 6. The general design approach:

Case:

 the difference:

 

Guess you like

Origin www.cnblogs.com/itboxue/p/11695620.html