Home > Article > Web Front-end > A brief analysis of CSS border properties: width & style & border, etc.
This article introduces to you a brief analysis of CSS border properties: width & style & border, etc. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
Definition and Usage
One or more lines surrounding the content and padding of an element.
Basic attributes: Width, style, color
Width border-width
thin,
medium,
thick, which are thin, medium (default) and thick.
Style border-style
The border-style property is used to set the style of the element border.Description | |
---|---|
Definition None frame. | |
Same as "none". Except when applied to tables, for which hidden is used to resolve border conflicts. | |
Define dotted border. Renders as a solid line in most browsers. | |
Define dashed line. Renders as a solid line in most browsers. | |
Define a solid line. | |
Define double line. The width of the double line is equal to the value of border-width. | |
Define the 3D groove border. The effect depends on the value of border-color. | |
Define the 3D ridge border. The effect depends on the value of border-color. | |
Define the 3D inset border. The effect depends on the value of border-color. | |
Define the 3D outset border. The effect depends on the value of border-color. |
none, so if you want the border to appear, you must declare a style.
Color border-color
The border-color property is used to set the color of the element border.transparent. This value is used to create an invisible border with width.
Border and background
The border is above the background of the element.Border rounded corners
The rounded corner effect around the element is a frequently needed function. Theborder-radius attribute can set the rounded corners.
Extended attributes
border image border-imageRecommended related articles:What are the formatting context (FC) types in css layout? Introduction to formatting context (FC) types
Introduction to two ways of CSS grid layout (Grid) (with code)
The above is the detailed content of A brief analysis of CSS border properties: width & style & border, etc.. For more information, please follow other related articles on the PHP Chinese website!