Borrar propiedad de estilo
Ejemplo
Prohibir objetos flotantes en el lado izquierdo del texto en un elemento:
document.getElementById("demo").style.clear = "left";
Definición y uso
La propiedad clear establece o devuelve la posición del elemento en relación con los objetos flotantes.
Compatibilidad con navegador
Property | |||||
---|---|---|---|---|---|
clear | Yes | Yes | Yes | Yes | Yes |
Sintaxis
Devuelve la propiedad clara:
object.style.clear
Establezca la propiedad clara:
object.style.clear = "none|left|right|both|initial|inherit"
Valores de propiedad
Value | Description |
---|---|
none | Allows floating objects on both sides of the element. This is default |
left | No floating objects allowed on the left side of the element |
right | No floating objects allowed on the right side of the element |
both | No floating objects allowed on either the left or right side of the element |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Detalles técnicos
Valor por defecto: | ninguna |
---|---|
Valor devuelto: | Una cadena, que representa la posición de un elemento en relación con los objetos flotantes |
Versión CSS | CSS1 |
Más ejemplos
Ejemplo
Devuelve la propiedad clara:
alert(document.getElementById("demo").style.clear);
páginas relacionadas
Tutorial de CSS: CSS flotante
Referencia CSS: propiedad clara
❮ Objeto de estilo