نمط خاصية borderLeftStyle
مثال
أضف حدًا أيسرًا "متصلًا" إلى عنصر <div>:
document.getElementById("myDiv").style.borderLeftStyle = "solid";
التعريف والاستخدام
تقوم الخاصية borderLeftStyle بتعيين أو إرجاع نمط الحد الأيسر للعنصر.
دعم المتصفح
Property | |||||
---|---|---|---|---|---|
borderLeftStyle | Yes | Yes | Yes | Yes | Yes |
بناء الجملة
قم بإرجاع خاصية borderLeftStyle:
object.style.borderLeftStyle
قم بتعيين خاصية borderLeftStyle:
object.style.borderLeftStyle = value
قيم الملكية
Value | Description |
---|---|
none | Defines no border. This is default |
hidden | Same as "none", except in border conflict resolution for table elements |
dotted | Defines a dotted border |
dashed | Defines a dashed border |
solid | Defines a solid border |
double | Defines two borders. The width of the two borders are the same as the border-width value |
groove | Defines a 3D grooved border. The effect depends on the border-color value |
ridge | Defines a 3D ridged border. The effect depends on the border-color value |
inset | Defines a 3D inset border. The effect depends on the border-color value |
outset | Defines a 3D outset border. The effect depends on the border-color value |
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> إلى "منقط":
document.getElementById("myDiv").style.borderLeftStyle = "dotted";
مثال
إعادة نمط الحد الأيسر لعنصر <div>:
alert(document.getElementById("myDiv").style.borderLeftStyle);
مثال
عرض لجميع القيم المختلفة:
var listValue = selectTag.options[selectTag.selectedIndex].text;
document.getElementById("myDiv").style.borderLeftStyle = listValue;
الصفحات ذات الصلة
دروس CSS: CSS Border
مرجع CSS: خاصية نمط يسار الحدود
مرجع DOM HTML: خاصية الحدود