From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- files/pt-pt/web/css/background-image/index.html | 131 ++++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 files/pt-pt/web/css/background-image/index.html (limited to 'files/pt-pt/web/css/background-image/index.html') diff --git a/files/pt-pt/web/css/background-image/index.html b/files/pt-pt/web/css/background-image/index.html new file mode 100644 index 0000000000..fd513e19b1 --- /dev/null +++ b/files/pt-pt/web/css/background-image/index.html @@ -0,0 +1,131 @@ +--- +title: background-image +slug: Web/CSS/background-image +tags: + - CSS_1 + - CSS_2.1 + - CSS_3 + - Referencia_CSS +translation_of: Web/CSS/background-image +--- +

{{ CSSRef() }}

+ +

Resumo

+ +

A propriedade background-image configura a imagem de fundo para um elemento.

+ + + +

Sintaxe

+ +
background-image:uri | none | inherit
+
+ +

Valores

+ +
+
uri 
+
A localização da imagem de recurso para ser usada como imagem de fundo.
+
none 
+
Usado para especificar que um elemento não tem imagem de fundo.
+
+ +

Exemplos

+ +

Note that the star image is partially transparent and is layered over the cat image.

+ +

HTML

+ +
<div>
+    <p class="catsandstars">
+        This paragraph is full of cats<br />and stars.
+    </p>
+    <p>This paragraph is not.</p>
+    <p class="catsandstars">
+        Here are more cats for you.<br />Look at them!
+    </p>
+    <p>And no more.</p>
+</div>
+ +

CSS

+ +
pre, p {
+    font-size: 1.5em;
+    color: #FE7F88;
+    background-color: transparent;
+}
+
+div {
+  background-image: url("https://mdn.mozillademos.org/files/6457/mdn_logo_only_color.png");
+}
+
+p {
+  background-image: none;
+}
+
+.catsandstars {
+  background-image:  url("https://mdn.mozillademos.org/files/11991/startransparent.gif"),
+                     url("https://mdn.mozillademos.org/files/7693/catfront.png");
+  background-color: transparent;
+}
+
+ +

Result

+ +

{{EmbedLiveSample('Exemplos')}}

+ +

Notas

+ +

Desenvolvedores devem assegurar-se de especificar um {{ Cssxref("background-color") }} para ser usado se uma imagem não estiver disponível. Imagens de fundo são renderizadas sobre a cor de fundo.

+ +

Especificações

+ + + +

Compatibilidade com navegadores

+ + + + + + + + + + + + + + + + + + + + + + + + +
NavegadorVersão mais antiga
Internet Explorer4
Firefox1
Netscape4
Opera3.5
+ +

Veja também

+ +

{{ Cssxref("background") }}, {{ Cssxref("background-attachment") }}, {{ Cssxref("background-color") }}, {{ Cssxref("background-image") }}, {{ Cssxref("background-position") }}, {{ Cssxref("background-repeat") }}

+ +

Categorias

+ +

Interwiki Language Links

+ +

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

-- cgit v1.2.3-54-g00ecf