从CSS流畅的布局来看:当容器宽度增加时,基于百分比的边距顶部会增加:
在CSS中,所有四个margin:和padding:百分比都是相对于宽度的,尽管这似乎很荒谬。这就是CSS规范的方式,对此您无能为力。
'padding-top', 'padding-right', 'padding-bottom', 'padding-left'Value: <padding-width> | inheritInitial: 0Applies to: all elements except table-row-group, table-header-group, table-footer-group, table-row, table-column-group and table-columnInherited: noPercentages: refer to width of containing blockMedia: visualComputed value: the percentage as specified or the absolute length
百分比:指包含块的宽度



