Difference between static and relative positioning

后端 未结 8 1338
野性不改
野性不改 2020-11-27 11:09

In CSS, what is the difference between static (default) positioning and relative positioning?

8条回答
  •  猫巷女王i
    2020-11-27 11:35

    Position relative lets you use top/bottom/left/right for positioning. Static won't let you do this unless you use margin parameters. There's a difference between Top and margin-top.

    You won't need to use static much as it's default

提交回复
热议问题