Thuộc tính kiểu đường viền bên trái CSS
Thí dụ
Đặt kiểu cho đường viền bên trái:
div {border-left-style: dotted;}
Thêm các ví dụ "Hãy tự mình thử" bên dưới.
Định nghĩa và Cách sử dụng
Thuộc border-left-style
tính đặt kiểu đường viền bên trái của một phần tử.
Giá trị mặc định: | không ai |
---|---|
Thừa hưởng: | không |
Hoạt hình: | không. Đọc về hoạt hình |
Phiên bản: | CSS1 |
Cú pháp JavaScript: | đối tượng .style.borderLeftStyle = "dotted" |
Hỗ trợ trình duyệt
Các số trong bảng chỉ định phiên bản trình duyệt đầu tiên hỗ trợ đầy đủ thuộc tính.
Property | |||||
---|---|---|---|---|---|
border-left-style | 1.0 | 5.5 | 1.0 | 1.0 | 9.2 |
Cú pháp CSS
border-left-style: none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|initial|inherit;
Giá trị tài sản
Value | Description | Play it |
---|---|---|
none | Specifies no border. This is default | |
hidden | The same as "none", except in border conflict resolution for table elements | |
dotted | Specifies a dotted border | |
dashed | Specifies a dashed border | |
solid | Specifies a solid border | |
double | Specifies a double border | |
groove | Specifies a 3D grooved border. The effect depends on the border-color value | |
ridge | Specifies a 3D ridged border. The effect depends on the border-color value | |
inset | Specifies a 3D inset border. The effect depends on the border-color value | |
outset | Specifies a 3D outset border. The effect depends on the border-color value | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
Các ví dụ khác
Thí dụ
Đường viền bên trái đứt đoạn:
div {border-left-style: dashed;}
Thí dụ
Đường viền bên trái chắc chắn:
div {border-left-style: solid;}
Thí dụ
Một đường viền kép bên trái:
div {border-left-style: double;}
Thí dụ
Xóa đường viền bên trái:
div {border-left-style: none;}
Thí dụ
Đường viền bên trái có rãnh:
div {
border-left-style: groove;
border-left-color: coral;
border-left-width: 7px;
}
Thí dụ
Đường viền bên trái sườn núi:
div {
border-left-style: ridge;
border-left-color: coral;
border-left-width: 7px;
}
Thí dụ
Đường viền bên trái in chìm:
div {
border-left-style: inset;
border-left-color: coral;
border-left-width: 7px;
}
Thí dụ
Đường viền bên trái ngay từ đầu:
div {
border-left-style: outset;
border-left-color: coral;
border-left-width: 7px;
}
Các trang liên quan
Hướng dẫn CSS: Đường viền CSS
Tham chiếu CSS: thuộc tính border-left
Tham chiếu DOM HTML: thuộc tính borderLeftStyle