Styl jasný Vlastnost
Příklad
Zakázat plovoucí objekty na levé straně textu v prvku:
document.getElementById("demo").style.clear = "left";
Definice a použití
Vlastnost clear nastavuje nebo vrací polohu prvku vzhledem k plovoucím objektům.
Podpora prohlížeče
Property | |||||
---|---|---|---|---|---|
clear | Yes | Yes | Yes | Yes | Yes |
Syntax
Vraťte čistou vlastnost:
object.style.clear
Nastavte vlastnost clear:
object.style.clear = "none|left|right|both|initial|inherit"
Hodnoty vlastností
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 |
Technické údaje
Výchozí hodnota: | žádný |
---|---|
Návratová hodnota: | Řetězec představující polohu prvku vzhledem k plovoucím objektům |
Verze CSS | CSS1 |
Další příklady
Příklad
Vraťte čistou vlastnost:
alert(document.getElementById("demo").style.clear);
Související stránky
CSS tutoriál: CSS Float
CSS reference: vlastnost clear
❮ Objekt stylu