สไตล์textOverflowคุณสมบัติ
ตัวอย่าง
เปลี่ยนคุณสมบัติ textOverflow:
document.getElementById("myDIV").style.textOverflow = "ellipsis";
ความหมายและการใช้งาน
คุณสมบัติ textOverflow ระบุสิ่งที่ควรเกิดขึ้นเมื่อข้อความล้นองค์ประกอบที่มีอยู่
รองรับเบราว์เซอร์
Property | |||||
---|---|---|---|---|---|
textOverflow | Yes | Yes | Yes | Yes | Yes |
ไวยากรณ์
ส่งคืนคุณสมบัติ textOverflow:
object.style.textOverflow
ตั้งค่าคุณสมบัติ textOverflow:
object.style.textOverflow = "clip|ellipsis|string|initial|inherit"
มูลค่าทรัพย์สิน
Value | Description |
---|---|
clip | Default value. Clips the text |
ellipsis | Render an ellipsis ("...") to represent clipped text |
string | Render the given string to represent clipped text |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
รายละเอียดทางเทคนิค
ค่าเริ่มต้น: | คลิป |
---|---|
คืนมูลค่า: | สตริงที่แสดงถึงคุณสมบัติข้อความล้นขององค์ประกอบ |
เวอร์ชัน CSS | CSS3 |
หน้าที่เกี่ยวข้อง
การอ้างอิง CSS: คุณสมบัติข้อความล้น
❮ สไตล์วัตถุ