Gaya overflowX Properti
Contoh
Gulir secara horizontal jika teks melebihi area konten elemen:
document.getElementById("myDIV").style.overflowX = "scroll";
Definisi dan Penggunaan
Properti overflowX menentukan apa yang harus dilakukan dengan tepi kiri/kanan konten - jika melebihi area konten elemen.
Tip: Gunakan properti overflowY untuk menentukan kliping di tepi atas dan bawah.
Dukungan Peramban
Property | |||||
---|---|---|---|---|---|
overflowX | Yes | Yes | Yes | Yes | Yes |
Sintaksis
Kembalikan properti overflowX:
object.style.overflowX
Setel properti overflowX:
object.style.overflowX = "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-x dari suatu elemen |
Versi CSS | CSS3 |
Halaman Terkait
Referensi CSS: properti overflow-x
Objek Gaya