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

<< Guida di riferimento ai CSS

+ +

Sommario

+ +

La proprietà background-image imposta l'immagine di sfondo di un elemento.

+ + + +

Sintassi

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

Valori

+ +
+
uri 
+
L'indirizzo dell'immagine da utilizzare come sfondo
+
none 
+
Specifica che l'elemento non ha alcuna immagina di sfondo
+
+ +

Esempi

+ +

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('Esempi')}}

+ +

Note

+ +

Gli sviluppatori dovrebbero specificare la proprietà background-color, cioè un colore di sfondo che verrà mostrato se l'immagine non è disponibile. Le immagini di sfondo vengono mostrare sopra il colore di sfondo.

+ +

Specifiche

+ + + +

Browser Compatibility

+ + + + + + + + + + + + + + + + + + + + + + + + +
BrowserVersione minima
Internet Explorer4
Firefox1
Netscape4
Opera3.5
+ +

Vedi Anche

+ +

background

+ +

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

-- cgit v1.2.3-54-g00ecf