#padding-top

Defines the space inside the element, on the top side.

默认属性 padding-top: 0;

Removes any padding on the top.

padding-top: 50px;

You can use pixel values.

padding-top: 7em;

You can use (r)em values.

The value is relative to the font size:

  • em: relative to the element's current font size
  • rem: relative to <html> the root element's font size

padding-top: 30%;

You can use percentage values.
The percentage is based on the width of the element.