rgb(red,green,blue)
Intensidad entre 0 y 255
#RRGGBB
Valores entre 00 y FF ( decimal 0-255)
Especifica el color del background de un elemento.
div {
background-color: red;
}Especifica el color del background de un elemento.
h3 {
background-color: blue;
}
div {
background-color: red;
}
p {
background-color: yellow;
}Especifica una imagen para el background de un elemento.
body {
background-image: url("ggIzzI.jpg");
}Se repite la imagen horizontal y verticalmente
body {
background-image: url("cualquiera.png");
background-repeat: repeat-x; /* repetir horizontal */
background-repeat: repeat-y; /* repetir vertical */
background-repeat: no-repeat; /* no repetir */
}
Cambiar posicion de la imagen
body {
background-image: url("alfas.png");
background-position: right top;
}Indicar que la imagen tiene que estar fija
body {
background-image: url("alfa.png");
background-repeat: no-repeat;
background-position: right top;
background-attachment: fixed;
}body {
background: #ffffff url("alfa.png") no-repeat right top;
}