Gaya overflowY Properti
Contoh
Gulir secara vertikal jika teks melebihi area konten elemen:
document.getElementById("myDIV").style.overflowY = "scroll";
Definisi dan Penggunaan
Properti overflowY menentukan apa yang harus dilakukan dengan tepi atas/bawah konten - jika melebihi area konten elemen.
Tip: Gunakan properti overflowX untuk menentukan kliping di tepi kiri dan kanan.
Dukungan Peramban
Property | |||||
---|---|---|---|---|---|
overflowY | Yes | Yes | Yes | Yes | Yes |
Sintaksis
Kembalikan properti overflowY:
object.style.overflowY
Setel properti overflowY:
object.style.overflowY = "visible|hidden|scroll|auto|initial|inherit"
Nilai properti
Value | Description |
---|---|
visible | The content is not clipped, and it may be rendered outside the content box |
hidden | The content is clipped - and no scrolling mechanism is provided |
scroll | The content is clipped and a scrolling mechanism is provided |
auto | Should cause a scrolling mechanism to be provided for overflowing boxes |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Detail Teknis
Nilai Bawaan: | terlihat |
---|---|
Nilai Kembali: | Sebuah String, mewakili properti overflow-y dari suatu elemen |
Versi CSS | CSS3 |
Halaman Terkait
Referensi CSS: properti overflow-y
Objek Gaya