CSS mix-blend-mode Property

Beginner
⏱️ 7 min read
📚 Updated: Jun 2026
🎯 4 Examples
Backgrounds & Effects

What You’ll Learn

The mix-blend-mode property controls how an element blends with the content behind it. It is useful for artistic overlays, inverted text effects, and creative compositions.

01

Element Blending

Blend with the backdrop.

02

Syntax

Use blend mode keywords.

03

difference

Inverted text effects.

04

screen

Lighter blended results.

05

overlay

Rich contrast blending.

06

normal Default

No blending by default.

Introduction

The mix-blend-mode property in CSS allows you to control how the content of an element blends with the content of the element’s parent and the background behind it.

This property is particularly useful for creating artistic effects, such as overlays and color changes, by blending elements together using different modes.

Definition and Usage

The mix-blend-mode CSS property specifies how an element should blend with the backdrop behind it. That backdrop can include parent backgrounds, images, gradients, and other elements in the same stacking context.

This makes it possible to create dynamic text effects, tinted overlays, and bold hero compositions directly in CSS.

💡
Beginner Tip

Start with white text or a solid shape over a colorful background, then try difference, multiply, or overlay to see the effect clearly.

📝 Syntax

The syntax for the mix-blend-mode property is straightforward. You can apply it to any element to define how its content should blend with the content beneath it.

Apply mix-blend-mode to any element to define how it blends with content beneath it:

syntax.css
element {
  mix-blend-mode: blend-mode;
}

Here, blend-mode can be any of the predefined blending modes.

Basic Example

mix-blend-mode.css
h1 {
  font-size: 3rem;
  color: #fff;
  mix-blend-mode: difference;
}

Common Blend Mode Keywords

  • normal — no blending; default behavior
  • multiply, screen, overlay — popular general-purpose modes
  • darken, lighten, color-dodge, color-burn
  • hard-light, soft-light, difference, exclusion
  • hue, saturation, color, luminosity

Syntax Rules

  • You can apply one blend mode to the entire element.
  • The initial value is normal.
  • It affects how the element composites with the backdrop, including parent backgrounds and elements behind it.
  • It works on text, images, shapes, and entire panels.
  • For blending only the element’s own background layers, use background-blend-mode instead.

⚡ Quick Reference

QuestionAnswer
Initial valuenormal
Applies toAll elements
InheritedNo
AnimatableNo
Common useHero text, overlays, icons, and creative compositions

🎯 Default Value

The default value of mix-blend-mode is normal, which means no blending is applied and the element is drawn on top of the backdrop without any special compositing.

💎 Property Values

These are the predefined blending modes you can use with mix-blend-mode.

ValueExampleMeaning
normalmix-blend-mode: normal;No blending; default behavior
multiplymix-blend-mode: multiply;Multiplies colors for a darker result
screenmix-blend-mode: screen;Lightens the blended result
overlaymix-blend-mode: overlay;Combines multiply and screen based on backdrop
darkenmix-blend-mode: darken;Keeps the darker of the backdrop and element colors
lightenmix-blend-mode: lighten;Keeps the lighter of the backdrop and element colors
color-dodgemix-blend-mode: color-dodge;Brightens the backdrop to reflect the element color
color-burnmix-blend-mode: color-burn;Darkens the backdrop to reflect the element color
hard-lightmix-blend-mode: hard-light;Similar to overlay, but uses the element color
soft-lightmix-blend-mode: soft-light;A softer version of hard-light
differencemix-blend-mode: difference;Subtracts the darker color from the lighter color
exclusionmix-blend-mode: exclusion;Similar to difference, but with lower contrast
huemix-blend-mode: hue;Uses the element hue with backdrop luma and chroma
saturationmix-blend-mode: saturation;Uses the element saturation with backdrop hue and luma
colormix-blend-mode: color;Uses the element hue and chroma with backdrop luma
luminositymix-blend-mode: luminosity;Uses the element luma with backdrop hue and chroma
normal

No blending with the backdrop. Useful as the default and for comparison.

Element draws normally over the backdrop.

multiply

Darkens the element against the colorful backdrop.

Great for overlay panels and shapes.

screen

Produces a lighter blended result, opposite of multiply.

Useful on dark backdrops.

overlay

Increases contrast against the backdrop.

Popular for hero text and overlays.

What Gets Blended?

mix-blend-mode blends the element with the backdrop behind it, including:

  • Parent backgrounds — colors, gradients, and images on the parent element
  • Elements beneath — siblings or ancestors visible through stacking
  • Text and shapes — headlines, icons, and panels over photos or gradients
  • Hero compositions — one of the most popular beginner patterns

mix-blend-mode vs background-blend-mode

PropertyBlendsBest for
mix-blend-modeThe entire element with content behind itText, icons, or panels blending into the page backdrop
background-blend-modeThe element’s background layers with each otherLayered gradients, tinted backgrounds, texture overlays

👀 Live Preview

This headline uses mix-blend-mode: difference; over a colorful gradient backdrop:

The text color changes dynamically based on the colors behind it, creating a unique blend effect.

Examples Gallery

Try mix-blend-mode with difference text, multiply overlays, screen highlights, and a side-by-side mode comparison.

📚 Basic Blend Modes

Place an element over a colorful backdrop, then change how it blends with mix-blend-mode.

Example 1 — difference Text on a Gradient Backdrop

Blend headline text with a background image or gradient so the color shifts as the backdrop changes.

difference-text.html
<style>
  body {
    background: linear-gradient(135deg, #2563eb, #db2777, #facc15);
    min-height: 100vh;
    display: grid;
    place-items: center;
    color: #fff;
  }
  h1 {
    font-size: 3rem;
    mix-blend-mode: difference;
  }
</style>

<h1>Blending Text with Background</h1>
Try It Yourself

How It Works

The text color changes dynamically based on the colors behind it, creating a unique inverted blend effect.

Example 2 — multiply Overlay Shape

Darken a colorful backdrop by blending a semi-transparent panel with multiply.

multiply-overlay.css
.stage {
  background: linear-gradient(135deg, #facc15, #ef4444);
  padding: 2rem;
}
.overlay {
  background: #1e3a8a;
  padding: 1.5rem;
  mix-blend-mode: multiply;
}
Try It Yourself

How It Works

The overlay multiplies its color with the backdrop, producing a darker, richer composite.

🎨 More Blend Effects

Try contrast-heavy overlays and compare multiple modes on the same backdrop.

Example 3 — overlay on a Patterned Backdrop

Use overlay to merge a colored shape with a striped background for bold contrast.

overlay-shape.css
.stage {
  background: repeating-linear-gradient(45deg, #dbeafe, #dbeafe 10px, #93c5fd 10px, #93c5fd 20px);
  padding: 2rem;
}
.shape {
  width: 8rem;
  height: 5rem;
  background: #db2777;
  mix-blend-mode: overlay;
}
Try It Yourself

How It Works

overlay combines multiply and screen behavior, boosting contrast against the striped backdrop.

Example 4 — Compare Four Blend Modes

Use the same white text over an identical gradient with different blend modes.

mix-blend-compare.css
.tile {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: #fff;
}
.difference { mix-blend-mode: difference; }
.multiply { mix-blend-mode: multiply; }
Try It Yourself

How It Works

The same text and backdrop produce very different results depending on the chosen blend mode.

🧠 How mix-blend-mode Works

1

You place content over a backdrop

The element sits above a parent background, image, gradient, or other visible content.

Stacking
2

You choose a blend mode

Pick a keyword such as difference, multiply, or overlay.

Blend rule
3

The browser composites the element

The element is mathematically blended with the pixels behind it in the same stacking context.

Rendering
=

Creative visual effects

You get dramatic overlays and dynamic text effects from simple CSS.

🖥 Browser Compatibility

The mix-blend-mode property is widely supported in modern browsers, including the latest versions of Chrome, Firefox, Safari, Edge, and Opera. Test across browsers when blend effects are central to your design.

Baseline · Modern browsers

Blend elements in today’s browsers

Chrome, Firefox, Safari, Edge, and Opera support the standard blend mode keywords for mix-blend-mode.

96% Modern browser support
Google Chrome35+ · Desktop & Mobile
Full support
Mozilla Firefox30+ · Desktop & Mobile
Full support
Apple Safari8+ · macOS & iOS
Full support
Microsoft Edge79+ · Chromium
Full support
Opera22+ · Modern versions
Full support

Fallback behavior

In unsupported browsers, elements still render, but may appear without blending effects.

💻
Internet Explorer No support · Elements render without blend modes
None
mix-blend-mode property 96% supported

Bottom line: Use mix-blend-mode confidently in modern projects, and keep text readable when blend effects are decorative.

Conclusion

The mix-blend-mode property is a powerful tool for creating creative and dynamic visual effects on your website. By blending elements with their backgrounds in various ways, you can achieve effects from subtle overlays to dramatic inverted text.

Experiment with different blend modes to find the perfect effect for your project and enhance the visual appeal of your site.

💡 Best Practices

✅ Do

  • Start with text or a solid shape over a colorful backdrop
  • Try difference, multiply, and overlay first
  • Keep text contrast strong when blend effects are decorative
  • Use gradients when you want predictable demo results without external images
  • Compare modes side by side before choosing one

❌ Don’t

  • Expect visible blending without content behind the element
  • Confuse mix-blend-mode with background-blend-mode
  • Choose blend modes that make body text hard to read
  • Forget that parent isolation can block blending
  • Forget that normal is the default behavior

Key Takeaways

Knowledge Unlocked

Five things to remember about mix-blend-mode

Use these points when blending elements with the backdrop.

5
Core concepts
📝02

Blend Keywords

multiply, screen, overlay.

Values
🖼️03

Hero Text

Popular beginner pattern.

Use case
04

normal Default

No blending by default.

Default
🛠05

Not background-blend

Whole element blends.

Compare

❓ Frequently Asked Questions

The mix-blend-mode property controls how an element's content blends with the content behind it, including the parent background and elements stacked beneath it in the same stacking context.
The default value is normal, which means the element is drawn without blending into the backdrop.
mix-blend-mode blends the entire element, including text and children, with what is behind it. background-blend-mode only blends the element's own background layers together.
Start with difference for inverted text effects, multiply for darker overlays, screen for lighter overlays, and overlay for stronger contrast.
Blending needs visible content behind the element. Check stacking context, parent backgrounds, and whether isolation on a parent is blocking the blend.

Practice in the Live Editor

Open the HTML editor, place elements over colorful backdrops, and experiment with mix-blend-mode instantly.

HTML Editor →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

5 people found this page helpful