background-image

  • Revision slug: CSS/background-image
  • Revision title: background-image
  • Revision id: 184486
  • Created:
  • Creator: Verruckt
  • Is current revision? Não
  • コメント

Revision Content

{{template.CSSRef()}}

Resumo

The background-image property sets the background image for an element.

  • Valor inicial: none
  • Aplica-se a: all elements
  • Herança: no
  • Porcentagens: N/A
  • Mídia: visual
  • Valor computado: absolute URI or none

Sintaxe

background-image: uri | none | inherit

Valores

uri 
The location of the image resource to be used as a background image.
none 
Used to specify that an element is to have no background image.

Exemplos

{{template.CSSRefExampleLink("background-image")}}

body { background-image: url("images/darkpattern.png"); }

p { background-image: none; }

Notas

Developers should ensure that they specify a {{template.Cssxref("background-color")}} to be used if an image is not available. Background images are rendered on top of the background color.

Especificações

Compatibilidade com navegadores

Navegador Versão mais antiga
Internet Explorer 4
Firefox 1
Netscape 4
Opera 3.5

Veja também

{{wiki.template('CSS_Reference:Background')}}

Categorias

Interwiki Language Links

{{ wiki.languages( { "en": "en/CSS/background-image", "fr": "fr/CSS/background-image", "pl": "pl/CSS/background-image" } ) }}

Revision Source

<p>
{{template.CSSRef()}}
</p>
<h3 name="Resumo"> Resumo </h3>
<p>The <code>background-image</code> property sets the background image for an element.  
</p>
<ul><li> Valor inicial: none
</li><li> Aplica-se a: all elements
</li><li> Herança: no
</li><li> Porcentagens: N/A
</li><li> Mídia: <a href="pt/CSS/Media/Visual">visual</a>
</li><li> Valor computado: absolute URI or none
</li></ul>
<h3 name="Sintaxe"> Sintaxe </h3>
<pre class="eval">background-image: <i>uri</i> | none | inherit
</pre>
<h3 name="Valores"> Valores </h3>
<dl><dt> uri </dt><dd> The location of the image resource to be used as a background image.
</dd><dt> none </dt><dd> Used to specify that an element is to have no background image.
</dd></dl>
<h3 name="Exemplos"> Exemplos </h3>
<p>{{template.CSSRefExampleLink("background-image")}}
</p>
<pre>body { background-image: url("images/darkpattern.png"); }

p { background-image: none; }
</pre>
<h3 name="Notas"> Notas </h3>
<p>Developers should ensure that they specify a {{template.Cssxref("background-color")}} to be used if an image is not available.  Background images are rendered on top of the background color.
</p>
<h3 name="Especifica.C3.A7.C3.B5es"> Especificações </h3>
<ul><li> <a class="external" href="http://www.w3.org/TR/CSS1#background-image">CSS 1</a>
</li><li> <a class="external" href="http://www.w3.org/TR/CSS21/colors.html#propdef-background-image">CSS 2.1</a>
</li><li> <a class="external" href="http://www.w3.org/TR/2005/WD-css3-background-20050216/#the-background-image">CSS 3</a>
</li></ul>
<h3 name="Compatibilidade_com_navegadores"> Compatibilidade com navegadores </h3>
<table class="standard-table">
  <tbody><tr>
    <th>Navegador</th>
    <th>Versão mais antiga</th>
  </tr>
  <tr>
    <td>Internet Explorer</td>
    <td>4</td>
  </tr>
  <tr>
    <td>Firefox</td>
    <td>1</td>
  </tr>
  <tr>
    <td>Netscape</td>
    <td>4</td>
  </tr>
  <tr>
    <td>Opera</td>
    <td>3.5</td>
  </tr>
</tbody></table>
<h3 name="Veja_tamb.C3.A9m"> Veja também </h3>
<p>{{wiki.template('CSS_Reference:Background')}}
</p><p><span class="comment">Categorias</span>
</p><p><span class="comment">Interwiki Language Links</span>
</p>{{ wiki.languages( { "en": "en/CSS/background-image", "fr": "fr/CSS/background-image", "pl": "pl/CSS/background-image" } ) }}
Revert to this revision