vadnica-logo
X

CSS Property: scroll-padding-top

The scroll-padding-top property defines the distance from the top of the container to the snap position of child elements. This property only works when the snap position is set to the top of the child element. To see the effect of the scroll-padding-top property, the scroll-snap-align property must be set on child elements, while both scroll-padding-top and scroll-snap-type properties must be set on the parent element.

EXAMPLE
RESULT

This example shows how the scroll-padding-top property works. The gray area at the top represents the padding area. Elements will snap to the top of the content considering this padding.

px
Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
Item 7
Scroll-padding-top area: 200px

Thank you for visiting! Adding privacy policy.

© 2024 All rights reserved.

Vam je koda pomagala? Če želite podpreti moj trud pri pripravi vodičev in vzdrževanju strani, mi lahko namenite donacijo za kavo.