نمط textDecoration الخاصية
مثال
ضبط زخرفة النص لعنصر:
document.getElementById("demo").style.textDecoration = "underline overline";
التعريف والاستخدام
تعيّن الخاصية textDecoration أو تُرجع زخارف خام أكثر للنص.
نصيحة: لتحديد أكثر من نوع زخرفة لعنصر ما ، حدد قائمة بأنواع الزخرفة مفصولة بمسافات.
دعم المتصفح
Property | |||||
---|---|---|---|---|---|
textDecoration | Yes | Yes | Yes | Yes | Yes |
بناء الجملة
إرجاع خاصية textDecoration:
object.style.textDecoration
قم بتعيين خاصية textDecoration:
object.style.textDecoration = "none|underline|overline|line-through|blink|initial|inherit"
قيم الملكية
Value | Description |
---|---|
none | Defines a normal text. This is default |
underline | Defines a line under the text |
overline | Defines a line over the text |
line-through | Defines a line 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 | CSS1 |
مزيد من الأمثلة
مثال
إعادة زخرفة النص لعنصر:
alert(document.getElementById("demo").style.textDecoration);
الصفحات ذات الصلة
دروس CSS: نص CSS
مرجع CSS: خاصية زخرفة النص
❮ نمط الكائن