Thuộc tính style borderRightColor
Thí dụ
Thay đổi màu của đường viền bên phải của phần tử <div> thành màu đỏ:
document.getElementById("myDiv").style.borderRightColor = "red";
Định nghĩa và Cách sử dụng
Thuộc tính borderRightColor đặt hoặc trả về màu của đường viền bên phải của một phần tử.
Hỗ trợ trình duyệt
Property | |||||
---|---|---|---|---|---|
borderRightColor | Yes | Yes | Yes | Yes | Yes |
Cú pháp
Trả về thuộc tính borderRightColor:
object.style.borderRightColor
Đặt thuộc tính borderRightColor:
object.style.borderRightColor = "color|transparent|initial|inherit"
Giá trị tài sản
Value | Description |
---|---|
color | Specifies the color of the right border. Look at CSS Color Values for a complete list of possible color values. Default color is the current color of the element |
transparent | The color of the right border is transparent (underlying content will shine through) |
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: | màu hiện tại |
---|---|
Giá trị trả lại: | Một chuỗi, đại diện cho màu của đường viền bên phải của một phần tử |
Phiên bản CSS | CSS1 |
Các ví dụ khác
Thí dụ
Trả lại màu đường viền bên phải của phần tử <div>:
alert(document.getElementById("myDiv").style.borderRightColor);
Các trang liên quan
Hướng dẫn CSS: Đường viền CSS
Tham chiếu CSS: thuộc tính border-right-color
Tham chiếu DOM HTML: thuộc tính đường viền
❮ Đối tượng phong cách