CSS text-decoration-lineคุณสมบัติ
ตัวอย่าง
ตั้งค่าบรรทัดการตกแต่งข้อความประเภทต่างๆ:
div.a
{
text-decoration-line: overline;
}
div.b
{
text-decoration-line: underline;
}
div.c
{
text-decoration-line: line-through;
}
div.d
{
text-decoration-line: overline underline;
}
ความหมายและการใช้งาน
คุณสมบัติtext-decoration-line
กำหนดประเภทของการตกแต่งข้อความที่จะใช้ (เช่น ขีดเส้นใต้ ขีดเส้นใต้ ขีดเส้นใต้)
เคล็ดลับ:ดูคุณสมบัติtext-decorationด้วย ซึ่งเป็นคุณสมบัติ short-hand สำหรับ text-decoration-line, text-decoration-style และ text-decoration-color
หมายเหตุ:คุณยังสามารถรวมค่าได้มากกว่าหนึ่งค่า เช่น ขีดเส้นใต้และ ขีดเส้นใต้ เพื่อแสดงบรรทัดทั้งข้างใต้และเหนือข้อความ
ค่าเริ่มต้น: | ไม่มี |
---|---|
รับการถ่ายทอด: | ไม่ |
เคลื่อนไหวได้: | ไม่. อ่านเกี่ยวกับแอนิเมชั่น |
รุ่น: | CSS3 |
ไวยากรณ์ JavaScript: | วัตถุ .style.textDecorationLine="overline" |
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนคุณสมบัติอย่างสมบูรณ์
ตัวเลขตามด้วย -moz- หรือ -webkit- ระบุเวอร์ชันแรกที่ทำงานกับคำนำหน้า
Property | |||||
---|---|---|---|---|---|
text-decoration-line | 57.0 | 79.0 | 36.0 6.0 -moz- |
12.1 7.1 -webkit- |
44.0 |
ไวยากรณ์ CSS
text-decoration-line: none|underline|overline|line-through|initial|inherit;
มูลค่าทรัพย์สิน
Value | Description | Play it |
---|---|---|
none | Default value. Specifies no line for the text-decoration | |
underline | Specifies that a line will be displayed under the text | |
overline | Specifies that a line will be displayed over the text | |
line-through | Specifies that a line will be displayed through the text | |
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: คุณสมบัติ textDecorationLine