CSS text-decoration-styleคุณสมบัติ
ตัวอย่าง
กำหนดรูปแบบการตกแต่งข้อความประเภทต่างๆ:
div.a
{
text-decoration-line: underline;
text-decoration-style: solid;
}
div.b
{
text-decoration-line: underline;
text-decoration-style: wavy;
}
div.c
{
text-decoration-line: underline;
text-decoration-style: double;
}
div.d
{
text-decoration-line: overline underline;
text-decoration-style: wavy;
}
ความหมายและการใช้งาน
คุณสมบัติtext-decoration-style
กำหนดรูปแบบของการตกแต่งข้อความ (เช่น ทึบ, หยัก, จุด, ประ, คู่)
เคล็ดลับ:ดูคุณสมบัติtext-decorationด้วย ซึ่งเป็นคุณสมบัติ short-hand สำหรับ text-decoration-line, text-decoration-style และ text-decoration-color
ค่าเริ่มต้น: | แข็ง |
---|---|
รับการถ่ายทอด: | ไม่ |
เคลื่อนไหวได้: | ไม่. อ่านเกี่ยวกับแอนิเมชั่น |
รุ่น: | CSS3 |
ไวยากรณ์ JavaScript: | วัตถุ .style.textDecorationStyle="wavy" |
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนคุณสมบัติอย่างสมบูรณ์
Numbers ตามด้วย -moz- ระบุเวอร์ชันแรกที่ทำงานกับคำนำหน้า
Property | |||||
---|---|---|---|---|---|
text-decoration-style | 57.0 | 79.0 | 36.0 6.0 -moz- |
12.1 | 44.0 |
ไวยากรณ์ CSS
text-decoration-style: solid|double|dotted|dashed|wavy|initial|inherit;
มูลค่าทรัพย์สิน
Value | Description | Play it |
---|---|---|
solid | Default value. The line will display as a single line | |
double | The line will display as a double line | |
dotted | The line will display as a dotted line | |
dashed | The line will display as a dashed line | |
wavy | The line will display as a wavy line | |
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: คุณสมบัติ textDecorationStyle