Styl wyczyść Właściwość
Przykład
Zabroń pływania obiektów po lewej stronie tekstu w elemencie:
document.getElementById("demo").style.clear = "left";
Definicja i użycie
Właściwość clear ustawia lub zwraca pozycję elementu względem obiektów pływających.
Obsługa przeglądarki
Property | |||||
---|---|---|---|---|---|
clear | Yes | Yes | Yes | Yes | Yes |
Składnia
Zwróć czystą nieruchomość:
object.style.clear
Ustaw czystą właściwość:
object.style.clear = "none|left|right|both|initial|inherit"
Wartości nieruchomości
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 |
Szczegóły techniczne
Domyślna wartość: | Żaden |
---|---|
Wartość zwrotu: | String, reprezentujący pozycję elementu względem obiektów pływających |
Wersja CSS | CSS1 |
Więcej przykładów
Przykład
Zwróć czystą nieruchomość:
alert(document.getElementById("demo").style.clear);
Powiązane strony
Samouczek CSS: CSS Float
Odniesienie CSS: wyczyść właściwość
❮ Obiekt stylu