Proprietà inferiore CSS
Esempio
Imposta il bordo inferiore dell'elemento <div> a 10px sopra il bordo inferiore del suo elemento genitore più vicino con un certo posizionamento:
div.absolute {
position: absolute;
bottom:
10px;
width: 50%;
border: 3px solid #8AC007;
}
Definizione e utilizzo
La bottom
proprietà influisce sulla posizione verticale di un elemento posizionato. Questa proprietà non ha effetto sugli elementi non posizionati.
- Se posizione: assoluta; o posizione: fissa; - la
bottom
proprietà imposta il bordo inferiore di un elemento su un'unità sopra/sotto il bordo inferiore del suo predecessore posizionato più vicino. - Se posizione: relativa; - la
bottom
proprietà fa sì che il bordo inferiore dell'elemento si sposti sopra/sotto la sua posizione normale. - Se posizione: appiccicosa; - la
bottom
proprietà si comporta come se la sua posizione fosse relativa quando l'elemento è all'interno della finestra e come se la sua posizione fosse fissa quando è all'esterno. - Se posizione: statica; - la
bottom
proprietà non ha effetto.
Valore di default: | auto |
---|---|
Ereditato: | no |
Animabile: | sì. Leggi su animabile |
Versione: | CSS2 |
sintassi JavaScript: | oggetto .style.bottom="10px" |
Supporto browser
I numeri nella tabella specificano la prima versione del browser che supporta completamente la proprietà.
Property | |||||
---|---|---|---|---|---|
bottom | 1.0 | 5.0 | 1.0 | 1.0 | 6.0 |
Sintassi CSS
bottom: auto|length|initial|inherit;
Valori di proprietà
Value | Description | Play it |
---|---|---|
auto | Lets the browser calculate the bottom edge position. This is default | |
length | Sets the bottom edge position in px, cm, etc. Negative values are allowed. Read about length units | |
% | Sets the bottom edge position in % of containing element. Negative values are allowed | |
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: Posizionamento CSS
Riferimento CSS: proprietà superiore
Riferimento CSS: proprietà a sinistra
Riferimento CSS: diritto di proprietà
Riferimento HTML DOM: proprietà bottom