خاصية CSS border-top
مثال
عيّن نمط الحد العلوي لعناصر مختلفة:
h1 {
border-top: 5px solid red;
}
h2 {
border-top: 4px dotted blue;
}
div {
border-top: double;
}
التعريف والاستخدام
border-top
تحدد خاصية الاختزال جميع خصائص الحد العلوي في إعلان واحد .
يجب أن تكون الخصائص التي يمكن تعيينها بالترتيب التالي:
إذا تم حذف لون أعلى الحدود ، فسيكون اللون المطبق هو لون النص.
القيمة الافتراضية: | متوسط بلا لون |
---|---|
وارث: | رقم |
متحرك: | نعم ، انظر الخصائص الفردية . اقرأ عن animatable |
الإصدار: | CSS1 |
بناء جملة JavaScript: | الكائن .style.borderTop = "3 بكسل أزرق متقطع" |
دعم المتصفح
تحدد الأرقام الواردة في الجدول إصدار المتصفح الأول الذي يدعم الخاصية بالكامل.
Property | |||||
---|---|---|---|---|---|
border-top | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
بنية CSS
border-top: border-width border-style border-color|initial|inherit;
قيم الملكية
Value | Description |
---|---|
border-top-width | Required. Specifies the width of the top border. Default value is "medium" |
border-top-style | Required. Specifies the style of the top border. Default value is "none" |
border-top-color | Optional. Specifies the color of the top border. Default value is the color of 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: CSS Border
مرجع HTML DOM: خاصية borderTop