adobe stock icon Download 10 Free Photos & Assets From Adobe Stock Download Now

10 Snippets for Creating Unique Background Effects with CSS

on CSS

In modern web design backgrounds are big (both literally and figuratively). With the advent of HD (and now 4K) displays, designers create backgrounds that take up loads of screen real estate. Why? Because they make for an incredible visual impact and help to tell a story.

But there is so much more to backgrounds than simply throwing a photo or texture into a large space — a combination of CSS and the occasional bit of JavaScript power creating some amazing special effects.

Let’s explore some of the unique ways in which designers are spicing up backgrounds. We’ll also include a pen for each technique so that you can see exactly how they work.

CSS Blend Mode Color Change

This background effect is so cool that the fixed element on top appears to change color as the user scrolls. The use of CSS mix-blend-mode property allows for the change in hue, which is dependent upon the contents of the background.

Scrolling Animation

Reminiscent of side-scroll video games of the past, this technique features two distinct images – each scrolling in the opposite direction. It’s done with the help of CSS transform and some JS.


Skewed backgrounds are one of the hottest trends in web design. It’s an effect that was incredibly easy to implement in print design and a pain to do on the web – until now. This pure HTML/CSS solution makes it a cinch.

Moving Pictures

Using a fairly simple bit of CSS, this background allows for a smooth transition between multiple images. It makes for a much more lightweight slider than traditional JavaScript.

Animated Gradient

If not done carefully, an animated background can distract from any content sitting on top of it. This animated gradient example is nice because it’s a more subtle effect. Using JavaScript, you can define gradient colors to match your palette.

Blur on Scroll

This technique could be quite useful when you really want visitors to focus on the background image (like the header of a news article) and then allow for the easy reading of text on top. A little bit of jQuery changes the background-size property upon scroll to create the effect.

Fade-in Hero Image with Overlay

There are a few things going on with this example. First, a full-width hero image has a color overlay added on top to create a different hue. Then a fade animation is implemented to introduce the image in a visually smooth manner. Lastly, a parallax-style scrolling effect is added to the mix. The result is a very modern look that uses relatively little code (and no JS).

Background Zoom and Pan

Here’s an effect we’re seeing quite a bit lately. As the user hovers over a panel, the background image zooms in and pans along with any movements of the cursor. It’s an easy way to add some interactivity and maintain user interest.

Reveal on Hover

This example shows a split screen where the background is revealed based upon the position of the user’s mouse. Great for comparisons, like ‘before’ and ‘after’ shots.

Color Change on Scroll

Sometimes we forget how powerful the use of simple solid colors can be. Here, we see the impact it can make as background colors change based upon scroll position. This lightweight solution can be just as visually effective as heavy imagery.

Backgrounds at the Forefront

Backgrounds are no longer just a means to frame content – they’re now often part of the content itself. With so many interesting ways to utilize them, it’s worthwhile to experiment with various background techniques and see how they can enhance the user experience of your next project.

Related Tags