English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
CSS fondo-Método de uso y ejemplo del atributo repeatfondo-imagenAtributo repeat especificaFondoLa imagen de fondo se repetirá o se repetirá después de ajustar el tamaño y la posición, y cómo se repetirá. Utilice la abreviatura
El atributo generalmente es más conveniente.
La siguiente tabla resume el contexto de uso y el historial de versiones de este atributo. | repeat |
---|---|
Valor predeterminado: | Aplicable a: |
Todos los elementos | Herencia: |
No | Animable:No. Atributo de animación. |
Versión: | CSS 1,2,3 |
JavaScript sintaxis: | object object.style.backgroundRepeat="repeat-x" |
La sintaxis de este atributo es la siguiente:
fondo-repeat: repeat | repeat-x | repeat-y | no-repeat | initial | inherit
Los siguientes ejemplos muestran cómo usar fondo-Atributo repeat
body {fondo-imagen: url("images/gradient.png");fondo-repeat: repeat-x;}Prueba a ver‹/›
La siguiente tabla describe los valores de este atributo.
Valor | Descripción |
---|---|
repeat | Valor predeterminado. La imagen de fondo se repetirá en vertical y horizontal. |
repeat-x | La imagen de fondo se repetirá horizontalmente. |
repeat-y | La imagen de fondo se repetirá verticalmente. |
no-repeat | La imagen de fondo no se repetirá. |
initial | Establecer este atributo en su valor predeterminado. |
inherit | Si se especifica, el elemento asociado utiliza el fondo del elemento padre-Valor calculado del atributo repeat. |
fondo-Compatibilidad del navegador del atributo repeat, todos los navegadores principales admiten este atributo.
|
Por favor, consulte la siguiente instrucción:CSS fondo,CSS3Fondo.
Atributos relacionados:fondo,fondo-adjunto,fondo-color,fondo-cortar,fondo-imagen,fondo-origen,fondo-position,fondo-tamaño.