Visit Mozilla.org

CSS:background-attachment

De MDC



[editar] Resumen

Si una imagen de fondo background-image es especificada, background-attachment determina si la imagen será fija dentro de la pantalla o se desplazará junto al bloque contenedor.

[editar] Sintaxis

background-attachment: scroll | fixed | inherit

[editar] Valores

scroll 
Si scroll es especificado, la imagen de fondo se moverá dentro de la pantalla junto al bloque que la contiene.
fixed 
Si fixed es especificado, la imagen de fondo estará fija en la pantalla y no se moverá con el bloque contenedor.

[editar] Ejemplos

Ver ejemplos en acción

body {
	background-image: url("images/cartooncat.png");
	background-position: bottom left;
	background-attachment: fixed;
	background-repeat: no-repeat;
}

[editar] Especificaciones

[editar] Compatibilidad de navegadores

Navegador Versión mínima
Internet Explorer 4
Firefox 1
Netscape 6
Opera 3.5

[editar] Ver también

background, background-attachment, background-color, background-image, background-position, background-repeat