English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
border-left-The width CSS attribute is used to set the width of the left border of the element separately. However, in many cases, likeborder-widthorborder-leftSuch a shorthand CSS attribute is more convenient and preferable to use.
The following table provides usage instructions and version history of this attribute, as well as the syntax of using this attribute in JavaScript scripts.
Default value: | medium |
---|---|
Applicable to: | All elements |
Inheritance: | No |
Animated: | Yes.Please refer to Animation attribute. |
Version: | CSS 1,2,3 |
JavaScript syntax: | object.style.borderLeftWidth="thick" |
The syntax of this attribute is as follows:
border-left-width: thin | medium | thick | length | inherit
The following examples demonstrate how to use the border-left-width attribute.
p { border-style: solid; border-left-width: 15px; }Test to see‹/›
Note:You must specify in the border-bottom-width attribute was declared beforeborder-styleAttribute. The element must also have a border before the border width can be set, because theborder-styleThe default value of the attribute is none.
The following table describes the values of this attribute.
Value | Description |
---|---|
thin | Thin border. |
medium | Medium border. |
thick | Thick border. |
length | Length values in units such as px, pt, cm, em, etc., but negative values are not allowed. |
initial | Set this attribute to its default value. |
inherit | If specified, the associated element uses its parent element's border-left-The value of the width attribute. |
border-left-Browser compatibility of the width 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 properties:border,border-width,border-left,border-left-color,
border-left-style.