Specifies a top padding size measured in pixels that will be added to the image.
Padding will be affected by the value specified by background-color
parameter.
Values
This parameter accepts integer values in the range 0
to 500
with 0
disabling top padding.
-
1
: specify a top padding size of 1
pixel.
-
500
: specify a top padding size of 500
pixels.
Top padding will be added not increasing size values if specified. In the case that no size is specified padding will be added to the original image size.
Examples
In this example we are specifying a top padding of 40
pixels with padding-top=40
without background-color
:
GET
https://assets.imglab-cdn.net/woman-03.jpeg?padding-top=40
For this example we are applying again a top padding of 40
pixels with padding-top=40
and a black background with background-color=black
:
GET
https://assets.imglab-cdn.net/woman-03.jpeg?padding-top=40&background-color=black
Applying the same top padding with padding-top=40
but using an output format with alpha transparency with format=png
:
GET
https://assets.imglab-cdn.net/woman-03.jpeg?padding-top=40&format=png
In this example we set a general padding of 40
pixels with padding=40
, a specific top padding of 80
with padding-top=80
and a partial transparent background color with background-color=2B493E80
:
GET
https://assets.imglab-cdn.net/woman-03.jpeg?padding=40&padding-top=80&background-color=2B493E80&format=png