CSS-position positioning

Positioning and flow independent of document elements

  • absolute
  1. From the original position to locate

  2. The relative positioning of the nearest parent to locate, if not, then the relative positioning of the document.

  • relative
  1. Retain the original position to position

  2. Their original position relative positioning

  • fixed
  1. The relative positioning of the browser window is fixed
  • sticky viscous positioning
  1. It acts like a relative; when the page is scrolled beyond the target area, it behaves like a fixed

  2. You must specify top, right, one of the bottom, or left, four threshold

Guess you like

Origin www.cnblogs.com/hgwq/p/11627066.html