Through the border-style attribute setting, some selectable attributes are as follows:
dotted : dotted line dashed : dotted line solid : solid line double : double solid lineThe effect is as follows:
① Set the upper, lower, left and right borders as a whole through border-width
border-width: 5px;
The effect is as follows:
② Set the width of the border in four directions respectively
border-left-width : Set the left border width border-right-width : Set the right border width border-top-width : Set the top border width border-bottom-width : Set the bottom border widthborder-left-width: 20px; border-top-width: 15px; border-right-width: 10px; border-bottom-width: 5px;
The effect is as follows:
① Set the border color in four directions through the border-color attribute
border-color: red;
The effect is as follows:
② Set the border colors in four directions respectively
border-left-color : Set the left border color border-top-color : Set the top border color border-right-color : Set the right border color border-bottom-color : Set the bottom border colorborder-left-color: red; border-top-color: green; border-right-color: blue; border-bottom-color: blueviolet;
The effect is as follows:
① Set four rounded corners as a whole through the border-radius attribute
border-radius: 50px;
The effect is as follows:
② Set rounded corners in four directions respectively
border-top-left-radius : Set the upper left corner rounded border-bottom-left-radius : Set the lower left corner rounded border-top-right-radius : Set the upper right corner rounded border-bottom-right-radius : Set the lower right corner rounded cornersborder-top-left-radius: 50px; border-bottom-left-radius: 20px; border-top-right-radius: 10px; border-bottom-right-radius: 10px;
The effect is as follows:
Note: When modifying the border, the border line style and border width must be set before it will be displayed!!
This concludes this article about css border modification. For more related css border modification content, please search the previous articles of downcodes.com or continue to browse the relevant articles below. I hope you will support downcodes.com in the future!