<?xml version="1.0" encoding="utf-8"?>

CSS background-attachment property

We need the background-attachment property to specify whether the background image should scroll with the rest of the page or have a fixed position relative to the viewport. In other words, with the fixed value, the image will always be in sight, while with the scroll value, the image will scroll along with the content.

Improve your UX & Product skills with interactive courses that actually work