Skip to content

Latest commit

 

History

History
10 lines (7 loc) · 354 Bytes

README.md

File metadata and controls

10 lines (7 loc) · 354 Bytes

margin 负值问题

首先,要有一个概念:margin 既可以为正值,也可以为负值。

先说结论:

  • margin-top 负值时,元素向上移动;
  • margin-left 负值时,元素向左移动;
  • margin-right 负值时,右侧元素左移,自身不受影响;
  • margin-bottom 负值时,下方元素上移。