{"id":358917,"date":"2022-01-06T07:58:55","date_gmt":"2022-01-06T15:58:55","guid":{"rendered":"https:\/\/css-tricks.com\/?p=358917"},"modified":"2022-01-09T18:11:59","modified_gmt":"2022-01-10T02:11:59","slug":"fixed-background-effect","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/fixed-background-effect\/","title":{"rendered":"The Search For a Fixed Background Effect With Inline Images"},"content":{"rendered":"\n

I was working on a client project a few days ago and wanted to create a certain effect on an <img><\/code>. See, background images can do the effect I was looking for somewhat easily with background-attachment: fixed;<\/code>. With that in place, a background image stays in place\u2014even when the page scrolls. It isn\u2019t used all that often, so the effect can look unusual and striking, especially when used sparingly.<\/p>\n\n\n\n\n\n\n

Table of Contents<\/h2>