[CSS] [proprietà] background

background (proprietà CSS) imposta, con sintassi abbreviata, le proprietà dello sfondo dell’elemento HTML (colore, immagine, posizione, ecc.). L’impostazione avviene nel seguente ordine (implicito): background-color, background-image, background-repeat, background-attachment, background-position.

Sintassi

[selettore] {
  background: [ [background-color] [background-image] [background-repeat]
                [background-attachment] [background-position] ]
}
valore descrizione
XXX XXX

Esempi

<style>
p {
    background: url("https://goo.gl/lyQAkk") no-repeat top right;
}
</style>
<p>Testo con sfondo<br>Testo con sfondo</p>

Testo con sfondo
Testo con sfondo

Contenuti correlati

  • CSS
  • HTML
  • JavaScript
  • jQuery
  • PHP
  • SQL
  • WORDPRESS

Fonti esterne

css, proprietà css

Related Articles

0 Comment

Rispondi