The best CSS border properties Tutorial In 2024, In this tutorial you can learn Examples,Tag definitions and instructions,Browser Support,Property Value,related articles,

CSS border properties

Examples

Set up four border style:

p
{
border:5px solid red;
}


Tag definitions and instructions

Acronym Border property is set in a statement that all the border properties. / P>

Properties can be set separately (in order): border-width, border-style, and border-color.

If this value is not the lack of a relationship, for example, border: # FF0000; is allowed.

Defaults: not specified
inherit: no
version: CSS1
JavaScript syntax: object object.style.border = "3px solid blue"


Browser Support

Figures in the table represent the first browser to support the version number of the property.

属性
border 1.0 4.0 1.0 1.0 3.5

Property Value

value Explanation
border-width Specifies the width of the border
border-style Specifies the border style
border-color Specifies the color of the border
inherit Specifies the border should inherit the property values ​​from the parent element


related articles

CSS tutorial: CSS Border

CSS border properties
10/30