Văn bản kiểu dáng
Thí dụ
Hiển thị một đường lượn sóng dưới phần tử:
document.getElementById("demo").style.textDecorationStyle = "wavy";
Định nghĩa và Cách sử dụng
Thuộc tính textDecorationStyle đặt hoặc trả về cách dòng, nếu có, sẽ hiển thị.
Hỗ trợ trình duyệt
Property | |||||
---|---|---|---|---|---|
textDecorationStyle | 57.0 | 79.0 | 36.0 6.0 Moz |
12.1 | 44.0 |
Cú pháp
Trả về thuộc tính textDecorationStyle:
object.style.textDecorationStyle
Đặt thuộc tính textDecorationStyle:
object.style.textDecorationStyle = "solid|double|dotted|dashed|wavy|initial|inherit"
Giá trị tài sản
Value | Description |
---|---|
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 |
Chi tiết kỹ thuật
Giá trị mặc định: | cứng |
---|---|
Giá trị trả lại: | Một chuỗi, đại diện cho thuộc tính kiểu trang trí văn bản của một phần tử |
Phiên bản CSS | CSS3 |
Các trang liên quan
Tham chiếu CSS: thuộc tính text-decoration-style
❮ Đối tượng phong cách