Properti gaya dekorasi teks CSS
Contoh
Setel berbagai jenis gaya dekorasi teks:
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;
}
Definisi dan Penggunaan
Properti text-decoration-style
mengatur gaya dekorasi teks (seperti padat, bergelombang, putus-putus, putus-putus, ganda).
Tip: Lihat juga properti text-decoration , yang merupakan properti short-hand untuk text-decoration-line, text-decoration-style, dan text-decoration-color.
Nilai bawaan: | padat |
---|---|
Diwarisi: | tidak |
Animasi: | tidak. Baca tentang animasi |
Versi: kapan: | CSS3 |
Sintaks JavaScript: | objek .style.textDecorationStyle="bergelombang" |
Dukungan Peramban
Angka-angka dalam tabel menentukan versi browser pertama yang sepenuhnya mendukung properti.
Angka diikuti oleh -moz- menentukan versi pertama yang berfungsi dengan awalan.
Property | |||||
---|---|---|---|---|---|
text-decoration-style | 57.0 | 79.0 | 36.0 6.0 -moz- |
12.1 | 44.0 |
Sintaks CSS
text-decoration-style: solid|double|dotted|dashed|wavy|initial|inherit;
Nilai properti
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 |
Halaman Terkait
Tutorial CSS: Teks CSS
Referensi DOM HTML: properti textDecorationStyle