نمط المخطط التفصيلي خاصية النمط
مثال
أضف مخططًا "صلبًا" حول عنصر <div>:
document.getElementById("myDiv").style.outlineStyle = "solid";
التعريف والاستخدام
تقوم الخاصية outlineStyle بتعيين أو إرجاع نمط المخطط التفصيلي حول عنصر.
المخطط التفصيلي هو خط حول عنصر. يتم عرضه حول هامش العنصر. ومع ذلك ، فهو يختلف عن خاصية الحدود.
لا يعد المخطط التفصيلي جزءًا من أبعاد العنصر ، وبالتالي فإن خصائص عرض العنصر وارتفاعه لا تحتوي على عرض المخطط التفصيلي.
دعم المتصفح
Property | |||||
---|---|---|---|---|---|
outlineStyle | Yes | Yes | Yes | Yes | Yes |
بناء الجملة
قم بإرجاع خاصية المخطط التفصيلي:
object.style.outlineStyle
قم بتعيين خاصية OutlineStyle:
object.style.outlineStyle = value
قيم الملكية
Value | Description |
---|---|
none | Defines no outline. This is default |
hidden | The outline is turned off |
dotted | Defines a dotted outline |
dashed | Defines a dashed outline |
solid | Defines a solid outline |
double | Defines a double outline |
groove | Defines a 3D grooved outline. The effect depends on the outline-color value |
ridge | Defines a 3D ridged outline. The effect depends on the outline-color value |
inset | Defines a 3D inset outline. The effect depends on the outline-color value |
outset | Defines a 3D outset outline. The effect depends on the outline-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 | CSS2 |
مزيد من الأمثلة
مثال
تغيير نمط المخطط التفصيلي لعنصر <div>:
document.getElementById("myDiv").style.outlineStyle = "solid";
مثال
إرجاع نمط المخطط التفصيلي لعنصر <div>:
alert(document.getElementById("myDiv").style.outlineStyle);
مثال
عرض لجميع القيم المختلفة:
var listValue = selectTag.options[selectTag.selectedIndex].text;
document.getElementById("myDiv").style.outlineStyle = listValue;
الصفحات ذات الصلة
دروس CSS: مخطط CSS
مرجع CSS: خاصية نمط المخطط التفصيلي
مرجع DOM HTML: خاصية المخطط التفصيلي
❮ نمط الكائن