تتيح لك سمة CSS الشخصية المفضلة لدينا تخصيص الحدود بالكامل التي تظهر حول عناصر HTML. باستخدام HTML ، كان من المستحيل وضع حدود حول عنصر ما ، باستثناء الجدول. تتيح لك "حدود CSS" إنشاء أنماط حدود مخصصة ونقية مع القليل جدًا من العمل مقارنةً بالطرق القديمة لـ HTML.
تعيين الخاصية اختزال `border` كافة خصائص الحدود في تصريح واحد. \`\` \`المغلق border: 1px solid # 000؛
``The properties that can be set, are (in order):
1.`border-style`
2.`border-width`
3.`border-color`
4.`border-radius`
It does not matter if one of the values above are missing, for example:
``
المغلق border: red red؛
``The above code is also valid CSS.
### Border Styles
The `border-style` property sets a wide range of different types of borders.
The various values are:
-`dotted` - Sets a dotted border.
-`dashed` - Sets a dashed border.
-`solid` - Sets a solid border.
-`double` - Sets a double border.
-`groove` - Sets a 3D grooved border.
-`ridge` - Sets a 3D ridged border.
-`inset` - Sets a 3D inset border.
-`outset` - Sets a 3D outset border.
-`none` - Sets no border.
-`hidden` - Sets a hidden border.
Based on the property you choose, these styles can be mismatched.
You can style each side seperately:
``
المغلق نمط الحد الأعلى: صلب ؛ border-left-style: منقط ؛ border-right-style: dashed؛ نمط الحد السفلي: مزدوج ؛
As shown, the border property allows you to select different sections of it. [top, bottom, left, right]
### Border Width
To alter the thickness of your border use the border-width attribute. You may use key terms or exact values to define the border width. Note: You must
define a border-style for the border to show up. The width can be set as a specific size (in px, pt, cm, em, etc) or by using one of the three pre-defined
Now for the creative aspect of CSS Borders! With the use of the border-color attribute, you will be able to create customized borders to fit the flow and layout
of your website. Border colors can be any color defined by RGB, hexadecimal, or key terms. Below is an example of each of these types.
While it is nice that CSS allows a web developer to be very specific in creating a customized border, sometimes it is just easier and less of a headache to create a uniform border, all in single line of CSS code.