15525 shaares
4 résultats
taggé
sticky
The scroll-padding-top property
The scroll-padding-top property is applied to the parent container and acts just like a CSS top padding, defining offsets from the top of the scrolling area.
scroll-padding-top: <value>;
Copy
You can use any px, em, rem, vh, %, etc. value, as well as auto, where the user agent determines the offset as 0px.
Si on veut vraiment faire un menu sticky, autant le faire bien !
Les éléments à ne pas oublier quand on met en place un menu sticky. Comme quoi, ça n'est pas aussi évident que ça en a l'air...
Un tutoriel pour faire un menu sticky élégant et efficace.