给子元素margin-top时,若这个子元素前面没有其他内容,这个margin-top值会应用到父元素上

解决方案,给父元素设置:before

body:before{
		    content: "";
		    display: table;
		    /*或者display: inline-block;*/
		  }


相关文章:

  • 2021-12-05
  • 2021-07-11
  • 2022-12-23
  • 2022-02-08
  • 2021-12-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-12
  • 2022-01-29
  • 2021-09-24
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案