نمط خاصية borderLeftColor
مثال
غيّر لون الحد الأيسر لعنصر <div> إلى اللون الأحمر:
document.getElementById("myDiv").style.borderLeftColor = "red";
التعريف والاستخدام
تقوم الخاصية borderLeftColor بتعيين أو إرجاع لون الحد الأيسر للعنصر.
دعم المتصفح
Property | |||||
---|---|---|---|---|---|
borderLeftColor | Yes | Yes | Yes | Yes | Yes |
بناء الجملة
قم بإرجاع خاصية borderLeftColor:
object.style.borderLeftColor
قم بتعيين خاصية borderLeftColor:
object.style.borderLeftColor = "color|transparent|initial|inherit"
قيم الملكية
Value | Description |
---|---|
color | Specifies the color of the left border. Look at CSS Color Values for a complete list of possible color values. Default color is the current color of the element |
transparent | The color of the left border is transparent (underlying content will shine through) |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
تفاصيل تقنية
القيمة الافتراضية: | اللون الحالي |
---|---|
قيمة الإرجاع: | سلسلة ، تمثل لون الحد الأيسر للعنصر |
إصدار CSS | CSS1 |
مزيد من الأمثلة
مثال
إعادة لون الحد الأيسر لعنصر <div>:
alert(document.getElementById("myDiv").style.borderLeftColor);
الصفحات ذات الصلة
دروس CSS: CSS Border
مرجع CSS: خاصية لون الحدود اليسرى
مرجع DOM HTML: خاصية الحدود