Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 1075422 of mix-blend-mode

  • Revision slug: Web/CSS/mix-blend-mode
  • Revision title: mix-blend-mode
  • Revision id: 1075422
  • Created:
  • Creator: sarahgp
  • Is current revision? No
  • Comment

Revision Content

{{CSSRef}}

Summary

The mix-blend-mode CSS property describes how an element's content should blend with the content of the element that is below it and the element's background.

{{cssinfo}}

Syntax

/* Keyword values */
mix-blend-mode: normal;
mix-blend-mode: multiply;
mix-blend-mode: screen;
mix-blend-mode: overlay;
mix-blend-mode: darken;
mix-blend-mode: lighten;
mix-blend-mode: color-dodge;
mix-blend-mode: color-burn;
mix-blend-mode: hard-light;
mix-blend-mode: soft-light;
mix-blend-mode: difference;
mix-blend-mode: exclusion;
mix-blend-mode: hue;
mix-blend-mode: saturation;
mix-blend-mode: color;
mix-blend-mode: luminosity;

/* Global values */
mix-blend-mode: initial;
mix-blend-mode: inherit;
mix-blend-mode: unset;

Values

<blend-mode>
Is a {{cssxref("<blend-mode>")}} denoting the blending mode that should be applied. There can be several values, separated by commas.

Formal syntax

{{csssyntax}}

Examples

<svg>
  <g class="isolate">
    <circle cx="40" cy="40" r="40" fill="red"/>
    <circle cx="80" cy="40" r="40" fill="lightgreen"/>
    <circle cx="60" cy="80" r="40" fill="blue"/>
  </g>
</svg>
circle { mix-blend-mode: screen; }  
.isolate { isolation: isolate; } /* without isolation, the background color will be taken into account */

Live result

{{EmbedLiveSample("Examples", "100%", "180")}}

Specifications

Specification Status Comment
{{ SpecName('Compositing', '#mix-blend-mode', 'mix-blend-mode') }} {{ Spec2('Compositing') }} Initial definition

Browser compatibility

{{CompatibilityTable()}}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support

{{CompatChrome(41.0)}}

{{CompatGeckoDesktop('32.0')}} {{CompatUnknown()}} {{CompatVersionUnknown()}} 8.0
SVG {{CompatNo}} {{CompatGeckoDesktop('32.0')}} {{CompatUnknown()}} {{CompatNo}} {{CompatNo}}
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support

{{CompatChrome(41.0)}}

{{CompatGeckoMobile('32.0')}} {{CompatUnknown()}} {{CompatUnknown()}} 8.0
SVG {{CompatNo}} {{CompatGeckoMobile('32.0')}} {{CompatUnknown()}} {{CompatNo}} {{CompatNo}}

See also

  • {{cssxref("<blend-mode>")}}
  • {{cssxref("background-blend-mode")}}

Revision Source

<p>{{CSSRef}}</p>

<h2 id="Summary" name="Summary">Summary</h2>

<p>The <strong><code>mix-blend-mode</code></strong> CSS property describes how an element's content should blend with the content of the element that is below it and the element's background.</p>

<p>{{cssinfo}}</p>

<h2 id="Syntax" name="Syntax">Syntax</h2>

<pre class="brush:css">
/* Keyword values */
mix-blend-mode: normal;
mix-blend-mode: multiply;
mix-blend-mode: screen;
mix-blend-mode: overlay;
mix-blend-mode: darken;
mix-blend-mode: lighten;
mix-blend-mode: color-dodge;
mix-blend-mode: color-burn;
mix-blend-mode: hard-light;
mix-blend-mode: soft-light;
mix-blend-mode: difference;
mix-blend-mode: exclusion;
mix-blend-mode: hue;
mix-blend-mode: saturation;
mix-blend-mode: color;
mix-blend-mode: luminosity;

/* Global values */
mix-blend-mode: initial;
mix-blend-mode: inherit;
mix-blend-mode: unset;
</pre>

<h3 id="Values" name="Values">Values</h3>

<dl>
 <dt><code>&lt;blend-mode&gt;</code></dt>
 <dd>Is a {{cssxref("&lt;blend-mode&gt;")}} denoting the blending mode that should be applied. There can be several values, separated by commas.</dd>
</dl>

<h3 id="Formal_syntax">Formal syntax</h3>

<pre class="syntaxbox">
{{csssyntax}}</pre>

<h2 id="Examples" name="Examples">Examples</h2>

<pre class="brush: html">
&lt;svg&gt;
  &lt;g class="isolate"&gt;
    &lt;circle cx="40" cy="40" r="40" fill="red"/&gt;
    &lt;circle cx="80" cy="40" r="40" fill="lightgreen"/&gt;
    &lt;circle cx="60" cy="80" r="40" fill="blue"/&gt;
  &lt;/g&gt;
&lt;/svg&gt;</pre>

<pre class="brush:css">
circle { mix-blend-mode: screen; }  
.isolate { isolation: isolate; } /* without isolation, the background color will be taken into account */
</pre>

<h3 id="Live_result">Live result</h3>

<p>{{EmbedLiveSample("Examples", "100%", "180")}}</p>

<h2 id="Specifications" name="Specifications">Specifications</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{ SpecName('Compositing', '#mix-blend-mode', 'mix-blend-mode') }}</td>
   <td>{{ Spec2('Compositing') }}</td>
   <td>Initial definition</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility" name="Browser_compatibility">Browser compatibility</h2>

<p>{{CompatibilityTable()}}</p>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>
    <p class="p1">{{CompatChrome(41.0)}}</p>
   </td>
   <td>{{CompatGeckoDesktop('32.0')}}</td>
   <td>{{CompatUnknown()}}</td>
   <td>{{CompatVersionUnknown()}}</td>
   <td>8.0</td>
  </tr>
  <tr>
   <td>SVG</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatGeckoDesktop('32.0')}}</td>
   <td>{{CompatUnknown()}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>IE Mobile</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>
    <p class="p1">{{CompatChrome(41.0)}}</p>
   </td>
   <td>{{CompatGeckoMobile('32.0')}}</td>
   <td>{{CompatUnknown()}}</td>
   <td>{{CompatUnknown()}}</td>
   <td>8.0</td>
  </tr>
  <tr>
   <td>SVG</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatGeckoMobile('32.0')}}</td>
   <td>{{CompatUnknown()}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
  </tr>
 </tbody>
</table>
</div>

<h2 id="See_also" name="See_also">See also</h2>

<ul>
 <li>{{cssxref("&lt;blend-mode&gt;")}}</li>
 <li>{{cssxref("background-blend-mode")}}</li>
</ul>
Revert to this revision