خاصية CSS border-top-width property
مثال
قم بتعيين عرض للحد العلوي:
div {border-top-width: thin;}
المزيد من الأمثلة "جربها بنفسك" أدناه.
التعريف والاستخدام
تحدد الخاصية عرض border-top-width
الحد العلوي للعنصر.
ملاحظة: قم دائمًا بتعريف نمط الحدود أو
خاصية نمط الحد العلوي قبل border-top-width
الخاصية. يجب أن يكون للعنصر حدود قبل أن تتمكن من تغيير العرض.
القيمة الافتراضية: | متوسط |
---|---|
وارث: | رقم |
متحرك: | نعم. اقرأ عن animatable |
الإصدار: | CSS1 |
بناء جملة JavaScript: | الكائن .style.borderTopWidth = "5px" |
دعم المتصفح
تحدد الأرقام الواردة في الجدول إصدار المتصفح الأول الذي يدعم الخاصية بالكامل.
Property | |||||
---|---|---|---|---|---|
border-top-width | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
بنية CSS
border-top-width: medium|thin|thick|length|initial|inherit;
قيم الملكية
Value | Description | Play it |
---|---|---|
medium | Specifies a medium top border. This is default | |
thin | Specifies a thin top border | |
thick | Specifies a thick top border | |
length | Allows you to define the thickness of the top border. Read about length units | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
مزيد من الأمثلة
مثال
اضبط عرض الحد العلوي على متوسط:
div {border-top-width: medium;}
مثال
اضبط عرض الحد العلوي على سميك:
div {border-top-width: thick;}
مثال
اضبط عرض الحد العلوي على 1 بكسل:
div {border-top-width: 1px;}
مثال
اضبط عرض الحد العلوي على 15 بكسل:
div {border-top-width: 15px;}
الصفحات ذات الصلة
دروس CSS: CSS Border
مرجع CSS: خاصية border-top
مرجع DOM HTML: خاصية borderTopWidth