English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
border-left CSS attribute sets the width, style, and color of the element's left border. It is used to set various left border attributes (i.e.border-left-width,border-left-styleandborder-left-colorof ( ) Abbreviated Attribute.
The table below provides usage instructions and version history of this attribute, as well as the syntax of using this attribute in JavaScript scripts.
Default Value: | View All Attributes |
---|---|
Applicable To: | All Elements |
Inheritance: | None |
Animatable: | Yes,Please Refer to Individual Attribute.Please Refer to Animation Attributes. |
Version: | CSS 1,2,3 |
JavaScript Syntax: | object.style.borderLeft="2px solid red" |
The syntax of this attribute is as follows:
border-left: [ border-left-width border-left-style border-left-color ] | initial | inherit
The following example demonstrates how to use border-left Attribute.
h1 { border-left: 5px solid #ff0000; } p { border-left: 3px dotted #00ff00; }Test and See‹/›
The table below describes the value of this attribute.
Value | Description |
---|---|
border-left-width | Set the width of the element's left border. |
border-left-style | Set the line style of the element's left border. |
border-left-color | Set the color of the element's left border. |
initial | Set this attribute to its default value. |
inherit | If specified, the associated element adopts its parent element's border-left Attribute Value. |
border-Browser Compatibility of left Attribute, the numbers in the table below represent the minimum version number of the browser that supports this attribute; all mainstream browsers support this attribute.
|
See Tutorial:CSS Border,CSS3 Border.
Related Attributes:border,border-left-color,border-left-style,border-left-width.