Đường viền phong cáchBottomStyle thuộc tính
Thí dụ
Thêm đường viền dưới cùng "đặc" vào phần tử <div>:
document.getElementById("myDiv").style.borderBottomStyle = "solid";
Định nghĩa và Cách sử dụng
Thuộc tính borderBottomStyle đặt hoặc trả về kiểu của đường viền dưới cùng của một phần tử.
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 | |||||
---|---|---|---|---|---|
borderBottomStyle | 1.0 | 5.5 | 1.0 | 1.0 | 9.2 |
Lưu ý: Giá trị "hidden" không được hỗ trợ trong IE7 và các phiên bản cũ hơn. IE9 trở lên hỗ trợ "ẩn".
Cú pháp
Trả về thuộc tính borderBottomStyle:
object.style.borderBottomStyle
Đặt thuộc tính borderBottomStyle:
object.style.borderBottomStyle = value
Giá trị tài sản
Value | Description |
---|---|
none | Defines no border. This is default |
hidden | Same as "none", except in border conflict resolution for table elements |
dotted | Defines a dotted border |
dashed | Defines a dashed border |
solid | Defines a solid border |
double | Defines two borders. The width of the two borders are the same as the border-width value |
groove | Defines a 3D grooved border. The effect depends on the border-color value |
ridge | Defines a 3D ridged border. The effect depends on the border-color value |
inset | Defines a 3D inset border. The effect depends on the border-color value |
outset | Defines 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 |
Chi tiết kỹ thuật
Giá trị mặc định: | không ai |
---|---|
Giá trị trả lại: | Một chuỗi, đại diện cho kiểu của đường viền dưới cùng của một phần tử |
Phiên bản CSS | CSS1 |
Các ví dụ khác
Thí dụ
Thay đổi kiểu của đường viền dưới cùng của phần tử <div> thành "dotted":
document.getElementById("myDiv").style.borderBottomStyle = "dotted";
Thí dụ
Trả lại kiểu đường viền dưới cùng của phần tử <div>:
alert(document.getElementById("myDiv").style.borderBottomStyle);
Thí dụ
Một minh chứng của tất cả các giá trị khác nhau:
var listValue = selectTag.options[selectTag.selectedIndex].text;
document.getElementById("myDiv").style.borderBottomStyle = listValue;
Các trang liên quan
Hướng dẫn CSS: Đường viền CSS
Tham chiếu CSS: thuộc tính border-bottom-style
Tham chiếu DOM HTML: thuộc tính đường viền