border-width -- Define the width of the four borders
Value:
Values:
inherit: inheritance
Initial value: medium
Inheritance: No
Applies to: all elements
border: border, width: width .
Border-width value
thin: thin
medium: medium
thick: thick
The above width value has the following relationship : thin
Tips: border-width cannot use percentages and cannot take negative values, only length. (for example: px, em, etc.)!
Example
Specify four values for border-width
border-width:border-top-width border-right-width border-bottom-width border-left-width;
p#fourborders
{
border-width:thick medium thin 12px;
}
If four values are defined, then the four values are top and right respectively. , the width value of the bottom and left borders (starting from the top border and traversing in clockwise order).
Equivalent to the following definition
p#fourborders
{
border-top-width:thick;
border-right-width:medium;
border-bottom-width:thin;
border-left-width:12px;
}
is border -width specifies three values
border-width:border-top-width border-right-width/border-left-width border-bottom-width;
p#threeborders
{
border- width:thick 12px thin;
}
If only three values are defined, the middle value represents the width of the left and right borders.
Equivalent to the following definition
p #threeborders
{
border-top-width:thick;
border-right-width:12px;
border-bottom-width:thin;
border-left-width:12px;
}
Specify two values for border-width
border-width:border-top-width/border-bottom-width border-right-width/border-left-width;
p# twoborders
{
border-width:thick 12px;
}
If you define only two values, the former value represents the width of the upper and lower borders, and the latter value represents the width of the left and right borders.
Equivalent to the following definition
p#twoborders
{
border-top-width:thick;
border-right-width:12px;
border-bottom- width:thick;
border-left-width:12px;
}
Specify a value for border-width
border-width:border-top-width/border-bottom-width/border- right-width/border-left-width;
p#oneborders
{
border-width:thick;
}
If only one value is defined, this value represents the four sides Width.
Equivalent to the following definition
p#oneborders
{
border-top-width:thick;
border-right-width:thick;
border-bottom-width:thick;
border-left-width:thick;
}
The above is the detailed content of Tutorial on using CSS border-width property. For more information, please follow other related articles on the PHP Chinese website!

The fact that anchor positioning eschews HTML source order is so CSS-y because it's another separation of concerns between content and presentation.

Article discusses CSS margin property, specifically "margin: 40px 100px 120px 80px", its application, and effects on webpage layout.

The article discusses CSS border properties, focusing on customization, best practices, and responsiveness. Main argument: border-radius is most effective for responsive designs.

The article discusses CSS background properties, their uses in enhancing website design, and common mistakes to avoid. Key focus is on responsive design using background-size.

Article discusses CSS HSL colors, their use in web design, and advantages over RGB. Main focus is on enhancing design and accessibility through intuitive color manipulation.

The article discusses the use of comments in CSS, detailing single-line and multi-line comment syntaxes. It argues that comments enhance code readability, maintainability, and collaboration, but may impact website performance if not managed properly.

The article discusses CSS Selectors, their types, and usage for styling HTML elements. It compares ID and class selectors and addresses performance issues with complex selectors.

The article discusses CSS priority, focusing on inline styles having the highest specificity. It explains specificity levels, overriding methods, and debugging tools for managing CSS conflicts.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Dreamweaver Mac version
Visual web development tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

SublimeText3 Mac version
God-level code editing software (SublimeText3)

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Zend Studio 13.0.1
Powerful PHP integrated development environment
