Skip to main content
CSS-Tricks
  • Articles
  • Notes
  • Links
  • Guides
  • Almanac
  • Picks
  • Shuffle
Search

Articles Tagged
background-image

12 Articles
Direct link to the article Moving Backgrounds
animation background-image background-position

Moving Backgrounds

We often think of background images as texture or something that provides contrast for legible content — in other words, not really content. If it was content, you’d probably reach for an <img> anyway, accessibility and whatnot.

But there are …

Saleh Mubashar on Feb 9, 2023
Direct link to the article Image Illustration Filter
background-image mix-blend-mode repeating gradient

Image Illustration Filter

I like that sorta effect where an image almost looks like it’s an oil painting or an illustration made with a thick, runny ink fountain pen. I got the idea when Scott Vandehey shared his “halftone filter” effect on the …

Geoff Graham on Sep 27, 2022
Direct link to the article In Praise of Shadows
background-image centering grid object-fit scroll-snap stacking contexts

In Praise of Shadows

Our dear friend Robin has a new essay called In Praise of Shadows. Now, before you hop over there looking for nuggets on CSS box shadows, text shadows, and shadow filters… this is not that. It’s an essay …

Geoff Graham on Jul 12, 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 …

Alex Lazar on Jan 9, 2022
Direct link to the article Maybe there kinda is background-opacity?
background-image transparency

Maybe there kinda is background-opacity?

I was reading Jake’s “Cross-fading any two DOM elements is currently impossible” which is a wonderfully nerdy deep dive into how there is no real way to literally cross-fade elements. Yeah, you can animate both of their opacities, but even …

Chris Coyier on Dec 15, 2021
Direct link to the article More Control Over CSS Borders With background-image
background-image border

More Control Over CSS Borders With background-image

You can make a typical CSS border dashed or dotted. For example:

.box {
   border: 1px dashed black;
   border: 3px dotted red;
}

You don’t have all that much control over how big or long the dashes or gaps are. …

Chris Coyier on Aug 7, 2020
Direct link to the article How to Repeat Text as a Background Image in CSS Using element()
background-image element()

How to Repeat Text as a Background Image in CSS Using element()

There’s a design trend I’ve seen popping up all over the place. Maybe you’ve seen it too. It’s this sort of thing where text is repeated over and over. A good example is the price comparison website, GoCompare, who used …

Ollie Williams on Mar 26, 2020
Direct link to the article Creating a Maintainable Icon System with Sass
background-image icons Sass sass maps svg icons

Creating a Maintainable Icon System with Sass

One of my favorite ways of adding icons to a site is by including them as data URL background images to pseudo-elements (e.g. ::after) in my CSS. This technique offers several advantages:

  • They don’t require any additional HTTP requests
…
Tracy Rotton on Aug 3, 2021
Direct link to the article Managing Multiple Backgrounds with Custom Properties
background background-image custom properties multiple backgrounds

Managing Multiple Backgrounds with Custom Properties

One cool thing about CSS custom properties is that they can be a part of a value. Let’s say you’re using multiple backgrounds to pull off a design. Each background will have its own color, image, repeat, position, etc. It …

Chris Coyier on Jul 16, 2019
  • 1
  • 2
  • Older

CSS-Tricks is powered by DigitalOcean.

Keep up to date on web dev

with our hand-crafted newsletter

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