คุณสมบัติการเว้นวรรคคำ CSS
ตัวอย่าง
ระบุว่าช่องว่างระหว่างคำใน <p> องค์ประกอบควรเป็น 30 พิกเซล:
p
{
word-spacing: 30px;
}
ความหมายและการใช้งาน
คุณสมบัติword-spacing
เพิ่มหรือลดช่องว่างสีขาวระหว่างคำ
หมายเหตุ: อนุญาตให้ใช้ค่าลบ
ค่าเริ่มต้น: | ปกติ |
---|---|
รับการถ่ายทอด: | ใช่ |
เคลื่อนไหวได้: | ใช่. อ่านเกี่ยวกับแอนิเมชั่น |
รุ่น: | CSS1 |
ไวยากรณ์ JavaScript: | วัตถุ .style.wordSpacing="20px" |
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนคุณสมบัติอย่างสมบูรณ์
Property | |||||
---|---|---|---|---|---|
word-spacing | 1.0 | 6.0 | 1.0 | 1.0 | 3.5 |
ไวยากรณ์ CSS
word-spacing: normal|length|initial|inherit;
มูลค่าทรัพย์สิน
Value | Description | Play it |
---|---|---|
normal | Defines normal space between words (0.25em) . This is default | |
length | Defines an additional space between words (in px, pt, cm, em, etc). Negative values are allowed. Read about length units | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
หน้าที่เกี่ยวข้อง
กวดวิชา CSS: CSS Text
การอ้างอิง HTML DOM: คุณสมบัติ wordSpacing