Thuộc tính style borderBottomStyle
Ví dụ
Thêm đường viền dưới "đặc" vào phần tử <div>:
document.getElementById("myDiv").style.borderBottomStyle = "solid";
Hãy tự mình thử »Sự miêu tả
Thuộc tính borderBottomStyle đặt hoặc trả về kiểu đườ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 |
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 có |
---|---|
Giá trị trả về: | Một Chuỗi, biểu thị kiểu đường viền dưới cùng của phần tử |
Phiên bản CSS | CSS1 |
Thêm ví dụ
Ví dụ
Thay đổi kiểu đường viền dưới cùng của phần tử <div> thành "chấm":
document.getElementById("myDiv").style.borderBottomStyle = "dotted";
Hãy tự mình thử »Ví dụ
Trả về kiểu đường viền dưới cùng của phần tử <div>:
alert(document.getElementById("myDiv").style.borderBottomStyle);
Hãy tự mình thử »Ví dụ
Một minh chứng cho tất cả các giá trị khác nhau:
var listValue = selectTag.options[selectTag.selectedIndex].text;
document.getElementById("myDiv").style.borderBottomStyle = listValue;
Hãy tự mình thử »Trang liên quan
Hướng dẫn CSS: Đường viền CSS
Tham chiếu CSS: thuộc tính kiểu viền dưới
Tham chiếu DOM HTML: thuộc tính đường viền