CSS Clear Proprietà
Esempio
L'elemento <p> viene spinto sotto gli elementi mobili a sinistra (l'elemento <p> non consente elementi mobili sul lato sinistro):
img
{
float: left;
}
p.clear
{
clear: left;
}
Definizione e utilizzo
La clear
proprietà controlla il flusso accanto agli elementi mobili.
La clear
proprietà specifica cosa dovrebbe accadere con l'elemento che si trova accanto a un elemento mobile.
Suggerimento: guarda anche la proprietà.
float
Valore di default: | nessuno |
---|---|
Ereditato: | no |
Animabile: | no. Leggi su animabile |
Versione: | CSS1 |
sintassi JavaScript: | oggetto .style.clear="entrambi" |
Supporto browser
I numeri nella tabella specificano la prima versione del browser che supporta completamente la proprietà.
Property | |||||
---|---|---|---|---|---|
clear | 1.0 | 5.0 | 1.0 | 1.0 | 6.0 |
Sintassi CSS
clear: none|left|right|both|initial|inherit;
Valori di proprietà
Value | Description |
---|---|
none | Default. The element is not pushed below left or right floated elements |
left | The element is pushed below left floated elements |
right | The element is pushed below right floated elements |
both | The element is pushed below both left and right floated elements |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Pagine correlate
Tutorial CSS: CSS Float
Riferimento HTML DOM: proprietà clear