Skip to main content
CSS-Tricks
  • Articles
  • Alamanac
  • Guides
  • Videos
  • Books
  • Newsletter
Search

Articles Tagged
background-attachment

4 Articles
{
,

}
Direct link to the article Scroll Shadows? Pure CSS Parallax? Game Back On.
background-attachment cross-browser safari scrolling

Scroll Shadows? Pure CSS Parallax? Game Back On.

Chris calls scroll shadows one his favorite CSS-Tricks of all time. Lea Verou popularized the pure CSS approach using four layered background gradients with some clever background-attachment magic. The result is a slick scrolling interaction that gives users a hint …

Avatar of Geoff Graham
Geoff Graham on Jul 29, 2022
Direct link to the article The Search For a Fixed Background Effect With Inline Images
background-attachment background-image fixed position images

The Search For a Fixed Background Effect With Inline Images

I was working on a client project a few days ago and wanted to create a certain effect on an <img>. See, background images can do the effect I was looking for somewhat easily with background-attachment: fixed;. With …

Avatar of Alex Lazar
Alex Lazar on Jan 6, 2022 (Updated on Jan 9, 2022)
Direct link to the article The Fixed Background Attachment Hack
background-attachment fixed position scrolling

The Fixed Background Attachment Hack

What options do you have if you want the body background in a fixed position where it stays put on scroll? background-attachment: fixed in CSS, at best, does not work well in mobile browsers, and at worst is not even …

Avatar of Murtuzaali Surti
Murtuzaali Surti on Aug 27, 2021
Direct link to the article Use Cases for Fixed Backgrounds in CSS
background-attachment fixed position panels sliding

Use Cases for Fixed Backgrounds in CSS

File this into a category of personal “CSS Ah-Ha Moments“.

The background-attachment property has never seemed all that useful to me. I have always looked at it as some sort of old school design trick from the GeoCities …

Avatar of Geoff Graham
Geoff Graham on Aug 25, 2016 (Updated on Aug 26, 2016)

CSS-Tricks is powered by DigitalOcean.

Keep up to date on web dev

with our hand-crafted newsletter

DigitalOcean
  • About DO
  • Cloudways hosting
  • Legal stuff
  • Get free credit!
CSS-Tricks
  • Write for us!
  • Advertise with us
  • Contact us
Social
  • RSS Feeds
  • CodePen
  • Mastodon
  • X
Back to Top