CSS补漏

虽然有点困惑,但只需要记住:对于margin和padding,百分比按照父元素的宽计算,对于定位元素,则按照父元素的高计算。 试一下就知道了!

原文地址:https://www.cnblogs.com/njqa/p/8041348.html