Latest web development tutorials

Properti HTML DOM Style textDecorationLine

Gaya Referensi Obyek gaya Objects

contoh

Di bagian atas paragraf garis muncul:

document.getElementById("myP").style.textDecorationLine="overline";

Coba »

Definisi dan Penggunaan

textDecorationLine set properti atau kembali diubah jenis garis teks untuk digunakan.

Catatan: Anda juga dapat menggunakan textDecoration set properti textDecorationLine. Properti textDecoration adalah textDecorationLine, textDecorationStyle dan sifat textDecorationColor singkatan properti.

Catatan: Anda juga dapat menggunakan beberapa nilai secara bersamaan, seperti garis bawah dan overline, untuk menunjukkan garis atas dan di bawah teks.


Dukungan Browser

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Hampir semua browser utama tidak mendukung properti textDecorationLine.

Firefox mendukung alternatif lain dari atribut properti yang properti MozTextDecorationLine.


tatabahasa

Kembali sifat textDecorationLine:

object .style.textDecorationLine

Pengaturan properti textDecorationLine:

object .style.textDecorationLine="none|underline|overline|line-through|initial|inherit"

Nilai properti

描述
none 默认值。规定文本修饰没有线条。
underline 规定文本的下方将显示一条线。
overline 规定文本的上方将显示一条线。
line-through 规定文本的中间将显示一条线。
initial 设置该属性为它的默认值。请参阅 initial
inherit 从父元素继承该属性。请参阅 inherit

rincian teknis

default: tak satupun
Pengembalian: String mewakili text-decoration-line atribut dari elemen.
versi CSS CSS3


Artikel terkait

CSS Referensi: Properti text-Dekorasi-Line


Gaya Referensi Obyek gaya Objects