สไตล์ข้อความAlignLast Property
ตัวอย่าง
จัดแนวบรรทัดสุดท้ายของ Pragraph ให้ชิดขวา:
document.getElementById("myDIV").style.textAlignLast = "right";
ความหมายและการใช้งาน
คุณสมบัติ textAlignLast ระบุวิธีการจัดแนวบรรทัดสุดท้ายของข้อความ
หมายเหตุ:คุณสมบัติ textAlignLast จะใช้ได้กับองค์ประกอบที่มีคุณสมบัติ text-align ที่ตั้งค่าเป็น "justify" เท่านั้น
รองรับเบราว์เซอร์
Property | |||||
---|---|---|---|---|---|
textAlignLast | Yes | Yes | Not supported Use MozTextAlignLast |
Yes | Yes |
หมายเหตุ: Internet Explorer ไม่รองรับค่า "start" และ "end"
ไวยากรณ์
ส่งคืนคุณสมบัติ textAlignLast:
object.style.textAlignLast
ตั้งค่าคุณสมบัติ textAlignLast:
object.style.textAlignLast = "auto|left|right|center|justify|start|end|initial|inherit"
มูลค่าทรัพย์สิน
Value | Description |
---|---|
auto | Default value. The last line is justified and aligned left |
left | The last line is aligned to the left |
right | The last line is aligned to the right |
center | The last line is center-aligned |
justify | The last line is justified as the rest of the lines |
start | The last line is aligned at the beginning of the line (left if the text-direction is left-to-right, and right is the text-direction is right-to-left) |
end | The last line is aligned at the end of the line (right if the text-direction is left-to-right, and left is the text-direction is right-to-left) |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
รายละเอียดทางเทคนิค
ค่าเริ่มต้น: | รถยนต์ |
---|---|
คืนมูลค่า: | สตริงที่แสดงถึงคุณสมบัติ text-align-last ขององค์ประกอบ |
เวอร์ชัน CSS | CSS3 |
หน้าที่เกี่ยวข้อง
การอ้างอิง CSS: text-align-last property
❮ สไตล์วัตถุ