الفرق بين المراجعتين ل"CSS/text-decoration-line"

من موسوعة حسوب
< CSS
اذهب إلى التنقل اذهب إلى البحث
ط (استبدال النص - '\[\[تصنيف:(.*)\]\]' ب'{{SUBPAGENAME}}')
سطر 1: سطر 1:
 
<noinclude>{{DISPLAYTITLE:الخاصية <code>text-decoration-line</code>}}</noinclude>
 
<noinclude>{{DISPLAYTITLE:الخاصية <code>text-decoration-line</code>}}</noinclude>
الخاصية <code>text-decoration-line</code> في CSS تُحدِّد نوع خطوط الزخرفة (decorative lines) المستخدمة على النص. إذا كنت ستضبط عدِّة خاصيات لتحديد شكل خطوط الزخرفة، فمن المستحسن حينئذٍ استخدام الخاصية المختصرة <code>[[CSS/text-decoration|text-decoration]]</code>.<syntaxhighlight lang="css">
+
الخاصية <code>text-decoration-line</code> في CSS تُحدِّد نوع خطوط الزخرفة (decorative lines) المستخدمة على النص. إذا كنت ستضبط عدِّة خاصيات لتحديد شكل خطوط الزخرفة، فمن المستحسن حينئذٍ استخدام الخاصية المختصرة <code>[[CSS/text-decoration|text-decoration]]</code>.
/* الكلمات المحجوزة */
 
text-decoration-line: none;
 
text-decoration-line: underline;
 
text-decoration-line: overline;
 
text-decoration-line: line-through;
 
text-decoration-line: blink;
 
text-decoration-line: underline overline;              /* استخدام خطَيّ زخرفة */
 
text-decoration-line: overline underline line-through;  /* استخدام عدِّة خطوط زخرفة */
 
  
/* القيم العامة */
+
== بطاقة الخاصية ==
text-decoration-line: inherit;
 
text-decoration-line: initial;
 
text-decoration-line: unset;
 
</syntaxhighlight>
 
 
{| class="wikitable" style="width: 100%;"
 
{| class="wikitable" style="width: 100%;"
 
|-
 
|-
سطر 32: سطر 20:
 
|كما حُدِّدَت.
 
|كما حُدِّدَت.
 
|}
 
|}
 +
 +
<syntaxhighlight lang="css">
 +
/* الكلمات المحجوزة */
 +
text-decoration-line: none;
 +
text-decoration-line: underline;
 +
text-decoration-line: overline;
 +
text-decoration-line: line-through;
 +
text-decoration-line: blink;
 +
text-decoration-line: underline overline;              /* استخدام خطَيّ زخرفة */
 +
text-decoration-line: overline underline line-through;  /* استخدام عدِّة خطوط زخرفة */
 +
 +
/* القيم العامة */
 +
text-decoration-line: inherit;
 +
text-decoration-line: initial;
 +
text-decoration-line: unset;
 +
</syntaxhighlight>
  
 
== أمثلة ==
 
== أمثلة ==
سطر 67: سطر 71:
 
== البنية العامة ==
 
== البنية العامة ==
 
تقبل الخاصية <code>text-decoration-line</code> الكلمة المحجوزة <code>none</code> (التي تعني عدم استخدام زخرفة للنص)، أو قيمةً واحدةً أو أكثر من الكلمات المحجوزة الآتية التي يُفصَل بينها بفراغ.
 
تقبل الخاصية <code>text-decoration-line</code> الكلمة المحجوزة <code>none</code> (التي تعني عدم استخدام زخرفة للنص)، أو قيمةً واحدةً أو أكثر من الكلمات المحجوزة الآتية التي يُفصَل بينها بفراغ.
=== القيمة <code>underline</code> ===
+
=== <code>underline</code> ===
 
سيوضع خط الزخرفة تحت النص.
 
سيوضع خط الزخرفة تحت النص.
=== القيمة <code>overline</code> ===
+
=== <code>overline</code> ===
 
سيوضع خط الزخرفة فوق النص.
 
سيوضع خط الزخرفة فوق النص.
=== القيمة <code>line-through</code> ===
+
=== <code>line-through</code> ===
 
سيمر خط الزخرفة ضمن النص.
 
سيمر خط الزخرفة ضمن النص.
=== القيمة <code>blink</code> ===
+
=== <code>blink</code> ===
 
سيومض النص، لكن هذه الخاصية مهملة بسبب تفضيل استخدام [[CSS/animation|الحركات]] في CSS عليها.
 
سيومض النص، لكن هذه الخاصية مهملة بسبب تفضيل استخدام [[CSS/animation|الحركات]] في CSS عليها.
  

مراجعة 14:43، 26 يوليو 2018

الخاصية text-decoration-line في CSS تُحدِّد نوع خطوط الزخرفة (decorative lines) المستخدمة على النص. إذا كنت ستضبط عدِّة خاصيات لتحديد شكل خطوط الزخرفة، فمن المستحسن حينئذٍ استخدام الخاصية المختصرة text-decoration.

بطاقة الخاصية

القيمة الابتدائية none
تُطبَّق على جميع العناصر.
قابلة للوراثة لا
قابلة للتحريك لا
القيمة المحسوبة كما حُدِّدَت.
/* الكلمات المحجوزة */
text-decoration-line: none;
text-decoration-line: underline;
text-decoration-line: overline;
text-decoration-line: line-through;
text-decoration-line: blink;
text-decoration-line: underline overline;               /* استخدام خطَيّ زخرفة */
text-decoration-line: overline underline line-through;  /* استخدام عدِّة خطوط زخرفة */

/* القيم العامة */
text-decoration-line: inherit;
text-decoration-line: initial;
text-decoration-line: unset;

أمثلة

مثال على استخدام الخاصية text-decoration-line مع الخاصيات text-decoration-color و text-decoration-style على عنصرَي <p> لإضافة خطوط زخرفة للنص الموجود داخلهما:

<p class="wavy">هذا نصٌ تحته خطٌ أحمر مموج.</p>
<p class="both">لهذا النص خطوطٌ فوقه وتحته.</p>

شيفرة CSS:

.wavy { 
  text-decoration-line: underline;
  text-decoration-style: wavy;
  text-decoration-color: red;
}

.both {
  text-decoration-line: underline overline;
}

دعم المتصفحات

الميزة Chrome Firefox Internet Explorer Opera Safari
الدعم الأساسي 57 36.0 غير مدعومة 44 7.1 مع السابقة -webkit-

البنية العامة

تقبل الخاصية text-decoration-line الكلمة المحجوزة none (التي تعني عدم استخدام زخرفة للنص)، أو قيمةً واحدةً أو أكثر من الكلمات المحجوزة الآتية التي يُفصَل بينها بفراغ.

underline

سيوضع خط الزخرفة تحت النص.

overline

سيوضع خط الزخرفة فوق النص.

line-through

سيمر خط الزخرفة ضمن النص.

blink

سيومض النص، لكن هذه الخاصية مهملة بسبب تفضيل استخدام الحركات في CSS عليها.

البنية الرسمية

text-decoration-line: none | [ underline || overline || line-through || blink ];

مصادر ومواصفات