Properti bawah CSS
Contoh
Atur tepi bawah elemen <div> ke 10px di atas tepi bawah elemen induk terdekat dengan beberapa posisi:
div.absolute {
position: absolute;
bottom:
10px;
width: 50%;
border: 3px solid #8AC007;
}
Definisi dan Penggunaan
Properti bottom
mempengaruhi posisi vertikal elemen yang diposisikan. Properti ini tidak berpengaruh pada elemen yang tidak diposisikan.
- Jika posisi: mutlak; atau posisi: tetap; -
bottom
properti menetapkan tepi bawah elemen ke unit di atas/di bawah tepi bawah nenek moyang terdekatnya. - Jika posisi: relatif; -
bottom
properti membuat tepi bawah elemen bergerak di atas/di bawah posisi normalnya. - Jika posisi: lengket; -
bottom
properti berperilaku seperti posisinya relatif ketika elemen berada di dalam viewport, dan seperti posisinya tetap ketika berada di luar. - Jika posisi: statis; -
bottom
properti tidak berpengaruh.
Nilai bawaan: | mobil |
---|---|
Diwarisi: | tidak |
Animasi: | Ya. Baca tentang animasi |
Versi: kapan: | CSS2 |
Sintaks JavaScript: | objek .style.bottom="10px" |
Dukungan Peramban
Angka-angka dalam tabel menentukan versi browser pertama yang sepenuhnya mendukung properti.
Property | |||||
---|---|---|---|---|---|
bottom | 1.0 | 5.0 | 1.0 | 1.0 | 6.0 |
Sintaks CSS
bottom: auto|length|initial|inherit;
Nilai properti
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 |
Halaman Terkait
Tutorial CSS: Pemosisian CSS
Referensi CSS: properti teratas
Referensi CSS: properti kiri
Referensi CSS: properti yang tepat
Referensi DOM HTML: properti bawah