สไตล์ล้นXคุณสมบัติ
ตัวอย่าง
เลื่อนในแนวนอนหากข้อความล้นพื้นที่เนื้อหาขององค์ประกอบ:
document.getElementById("myDIV").style.overflowX = "scroll";
ความหมายและการใช้งาน
คุณสมบัติ overflowX ระบุว่าจะทำอย่างไรกับขอบซ้าย/ขวาของเนื้อหา - หากล้นพื้นที่เนื้อหาขององค์ประกอบ
เคล็ดลับ:ใช้ คุณสมบัติ overflowYเพื่อกำหนดการตัดที่ขอบด้านบนและด้านล่าง
รองรับเบราว์เซอร์
Property | |||||
---|---|---|---|---|---|
overflowX | Yes | Yes | Yes | Yes | Yes |
ไวยากรณ์
ส่งคืนคุณสมบัติ overflowX:
object.style.overflowX
ตั้งค่าคุณสมบัติ overflowX:
object.style.overflowX = "visible|hidden|scroll|auto|initial|inherit"
มูลค่าทรัพย์สิน
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 |
รายละเอียดทางเทคนิค
ค่าเริ่มต้น: | มองเห็นได้ |
---|---|
คืนมูลค่า: | สตริงที่แสดงถึงคุณสมบัติล้น-x ขององค์ประกอบ |
เวอร์ชัน CSS | CSS3 |
หน้าที่เกี่ยวข้อง
การอ้างอิง CSS: คุณสมบัติล้น-x
❮ สไตล์วัตถุ