Style clair Propriété
Exemple
Interdire les objets flottants à gauche du texte dans un élément :
document.getElementById("demo").style.clear = "left";
Définition et utilisation
La propriété clear définit ou renvoie la position de l'élément par rapport aux objets flottants.
Prise en charge du navigateur
Property | |||||
---|---|---|---|---|---|
clear | Yes | Yes | Yes | Yes | Yes |
Syntaxe
Renvoie la propriété clear :
object.style.clear
Définissez la propriété clear :
object.style.clear = "none|left|right|both|initial|inherit"
Valeurs de propriété
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 |
Détails techniques
Valeur par défaut: | rien |
---|---|
Valeur de retour : | Une chaîne, représentant la position d'un élément par rapport aux objets flottants |
Version CSS | CSS1 |
Plus d'exemples
Exemple
Renvoie la propriété clear :
alert(document.getElementById("demo").style.clear);
Pages connexes
Tutoriel CSS : flottant CSS
Référence CSS : propriété clear
❮ Objet de style