I. The restrictive effect of relative on absolute
1, limit left/top/right/bottom positioning. Absolute default is in the upper left corner, when the parent class is set to Relative,absolute is limited to the parent class's area, when setting Top/left/right/bottom, the starting point is the upper left corner of the parent class
2, limit the z-index level. The z-index of the two absolute on the page are different and not auto, and have their own hierarchy, and when the two absolute parent classes have relative, their hierarchies depend on the relative of the parent class Z-index
3, limit the effect under the overflow. By default, Overflow:hidden is unable to limit the absolute, when added relative, can be limited, when Overflow:auto or Overflow:scoll, there is a scroll bar, Absolute does not move with the scroll bar, you need to add relative
Second, relative can only limit the fixed z-index level
Third, relative and positioning
1, relative positioning and offset are relative to their location
2. Relative positioning does not affect the positioning of other elements. Function: can be used to customize the drag function
Four, the relative the influence principle of minimizing
Refers to minimizing the potential impact of the relative property on other elements or layouts
1, try to avoid the use of relative
2, must use the time, relative also must minimize