diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:52 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:52 -0500 |
commit | 074785cea106179cb3305637055ab0a009ca74f2 (patch) | |
tree | e6ae371cccd642aa2b67f39752a2cdf1fd4eb040 /files/pt-br/web/css/background-blend-mode | |
parent | da78a9e329e272dedb2400b79a3bdeebff387d47 (diff) | |
download | translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.gz translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.bz2 translated-content-074785cea106179cb3305637055ab0a009ca74f2.zip |
initial commit
Diffstat (limited to 'files/pt-br/web/css/background-blend-mode')
-rw-r--r-- | files/pt-br/web/css/background-blend-mode/index.html | 153 |
1 files changed, 153 insertions, 0 deletions
diff --git a/files/pt-br/web/css/background-blend-mode/index.html b/files/pt-br/web/css/background-blend-mode/index.html new file mode 100644 index 0000000000..a75c561838 --- /dev/null +++ b/files/pt-br/web/css/background-blend-mode/index.html @@ -0,0 +1,153 @@ +--- +title: background-blend-mode +slug: Web/CSS/background-blend-mode +tags: + - CSS + - Composição de CSS + - Propriedade CSS +translation_of: Web/CSS/background-blend-mode +--- +<div>{{CSSRef}}</div> + +<p>A propriedade CSS <strong><code>background-blend-mode</code></strong> descreve como as imagens de fundo do elemento devem se misturar entre si e a cor de fundo do elemento.</p> + +<pre class="brush:css no-line-numbers">/* Um valor */ +background-blend-mode: normal; + +/* Dois valores, um por fundo */ +background-blend-mode: darken, luminosity; + +/* Valores globais */ +background-blend-mode: initial; +background-blend-mode: inherit; +background-blend-mode: unset; +</pre> + +<p>Os modos de mistura devem ser definidos na mesma ordem que a propriedade CSS {{cssxref ("background-image")}}. Se os comprimentos da lista dos modos de mistura e das imagens de fundo não forem iguais, ele será repetido e/ou truncado até que os comprimentos correspondam.</p> + +<p>{{cssinfo}}</p> + +<h2 id="Sintaxe">Sintaxe</h2> + +<h3 id="Valores">Valores</h3> + +<dl> + <dt><code><blend-mode></code></dt> + <dd>É um {{cssxref ("<blend-mode>")}} denotando o modo de mesclagem a ser aplicado. Pode haver vários valores, separados por vírgulas.</dd> +</dl> + +<h3 id="Sintaxe_formal">Sintaxe formal</h3> + +<pre class="syntaxbox">{{csssyntax}}</pre> + +<h2 id="Exemplos">Exemplos</h2> + +<pre class="brush: html hidden"><div id="div"></div> +<select id="select"> + <option>normal</option> + <option>multiply</option> + <option selected>screen</option> + <option>overlay</option> + <option>darken</option> + <option>lighten</option> + <option>color-dodge</option> + <option>color-burn</option> + <option>hard-light</option> + <option>soft-light</option> + <option>difference</option> + <option>exclusion</option> + <option>hue</option> + <option>saturation</option> + <option>color</option> + <option>luminosity</option> +</select></pre> + +<pre class="brush: css hidden">#div { + width: 300px; + height: 300px; + background: url('https://mdn.mozillademos.org/files/8543/br.png'),url('https://mdn.mozillademos.org/files/8545/tr.png'); + background-blend-mode: screen; +}</pre> + +<pre class="brush: js hidden">document.getElementById("select").onchange = function(event) { + document.getElementById("div").style.backgroundBlendMode = document.getElementById("select").selectedOptions[0].innerHTML; +} +console.log(document.getElementById('div'));</pre> + +<p>{{ EmbedLiveSample('Examples', "330", "330") }}</p> + +<h2 id="Especificações">Especificações</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Especificação</th> + <th scope="col">Status</th> + <th scope="col">Comentário</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{ SpecName('Compositing', '#background-blend-mode', 'background-blend-mode') }}</td> + <td>{{ Spec2('Compositing') }}</td> + <td>Initial definition</td> + </tr> + </tbody> +</table> + +<h2 id="Compatibilidade_dos_navegadores">Compatibilidade dos navegadores</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>35</td> + <td>{{CompatGeckoDesktop('30.0')}}</td> + <td>{{CompatNo()}}</td> + <td>22</td> + <td>7.1</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>{{CompatNo()}}</td> + <td>{{CompatGeckoMobile('30.0')}}</td> + <td>{{CompatNo()}}</td> + <td>22</td> + <td>8</td> + </tr> + </tbody> +</table> +</div> + +<h2 id="See_also" name="See_also">Veja também</h2> + +<ul> + <li>{{cssxref("<blend-mode>")}}</li> + <li>{{cssxref("mix-blend-mode")}}</li> +</ul> |