How TO - Sticky Image
Learn how to create a sticky image with CSS.
Sticky Image
Note: This example does not work in Internet Explorer or Edge 15 and earlier versions.
Sticky Image
An element withposition: sticky; is positioned based on the user's scroll position.
A sticky element toggles betweenrelative andfixed, depending on the scroll position. It is positioned relative until a given offset position is met in the viewport - then it "sticks" in place (like position:fixed).
Note:You must specify at least one oftop,right,bottom orleft for sticky positioning to work.
To learn more about CSS positoning, read ourCSS Position tutorial.
To learn more about how to style images, read ourCSS Images tutorial.

