نمط textDecorationLine الملكية
مثال
اعرض عنصرًا يتخلله سطر في النص:
document.getElementById("demo").style.textDecorationLine = "line-through";
التعريف والاستخدام
تحدد الخاصية textDecorationLine أو تُرجع نوع السطر ، إن وجد ، الذي سيكون للزخرفة.
ملاحظة: يمكنك أيضًا تعيين textDecorationLine باستخدام خاصية textDecoration ، وهي خاصية مختصرة لخصائص textDecorationLine و textDecorationStyle و textDecorationColor.
ملاحظة: يمكنك أيضًا دمج أكثر من قيمة ، مثل التسطير والتسطير لعرض الأسطر أسفل النص وفوقه.
دعم المتصفح
Property | |||||
---|---|---|---|---|---|
textDecorationLine | 57.0 | 79.0 | 36.0 6.0 Moz |
7.0 Webkit | 44.0 |
بناء الجملة
قم بإرجاع خاصية textDecorationLine:
object.style.textDecorationLine
قم بتعيين خاصية textDecorationLine:
object.style.textDecorationLine = "none|underline|overline|line-through|initial|inherit"
قيم الملكية
Value | Description |
---|---|
none | Default value. Specifies no line for the text-decoration |
underline | Specifies that a line will be displayed under the text |
overline | Specifies that a line will be displayed over the text |
line-through | Specifies that a line will be displayed through the text |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
تفاصيل تقنية
القيمة الافتراضية: | لا أحد |
---|---|
قيمة الإرجاع: | سلسلة ، تمثل خاصية سطر زخرفة النص لعنصر |
إصدار CSS | CSS3 |
الصفحات ذات الصلة
مرجع CSS: خاصية سطر زخرفة النص
❮ نمط الكائن