Thuộc tính kiểu trang trí văn bản CSS
Thí dụ
Đặt các loại kiểu trang trí văn bản khác nhau:
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;
}
Định nghĩa và Cách sử dụng
Thuộc text-decoration-style
tính thiết lập kiểu trang trí văn bản (như rắn, lượn sóng, chấm, gạch ngang, kép).
Mẹo: Cũng hãy xem thuộc tính text-decoration , là thuộc tính ngắn gọn dành cho dòng văn bản-trang trí, văn bản-kiểu trang trí và màu văn bản.
Giá trị mặc định: | cứng |
---|---|
Thừa hưởng: | không |
Hoạt hình: | không. Đọc về hoạt hình |
Phiên bản: | CSS3 |
Cú pháp JavaScript: | đối tượng .style.textDecorationStyle = "wavy" |
Hỗ trợ trình duyệt
Các số trong bảng chỉ định phiên bản trình duyệt đầu tiên hỗ trợ đầy đủ thuộc tính.
Các số theo sau là -moz- chỉ định phiên bản đầu tiên hoạt động với tiền tố.
Property | |||||
---|---|---|---|---|---|
text-decoration-style | 57.0 | 79.0 | 36.0 6.0 -moz- |
12.1 | 44.0 |
Cú pháp CSS
text-decoration-style: solid|double|dotted|dashed|wavy|initial|inherit;
Giá trị tài sản
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 |
Các trang liên quan
Hướng dẫn CSS: Văn bản CSS
Tham chiếu DOM HTML: thuộc tính textDecorationStyle