CSS Borders
The CSS border properties are used to specify the style, color, and size of the border of an element. The CSS border properties are given below
- border-style
- border-color
- border-width
- border-radius
1. border-style ๐
The CSS border properties allow you to specify the style, width, and color of an element's border.
Example๐
CSS Border Style ๐
We can also use multiple CSS Border styles in one tag๐ (Clock-Wise)
2. border-color ๐
The border-color
property is used to set the color of the four borders.
Example ๐
Multiple border-color ๐
Example of using multiple border colors in CSS ๐
3. border-Width ๐
The border-width
property specifies the width of the four borders.
Specific Side Widths ๐
Example of border-Width ๐
4. border-radius ๐
The border-radius
property is used to add rounded borders to an element
For Multiple border-radius values ๐
CSS Shorthand Border Property ๐
To shorten the code, it is also possible to specify all the individual border properties in one property.
The border
property is a shorthand property for the following individual border properties:
border-width
border-style
(required)border-color
Example ๐
>
Download our HTML & CSS Visual Treat! ebook Here:
Click here