Thuộc tính CSS border-right
Thí dụ
Đặt kiểu của đường viền bên phải cho các phần tử khác nhau:
h1 {
border-right: 5px solid red;
}
h2 {
border-right: 4px dotted blue;
}
div {
border-right: double;
}
Định nghĩa và Cách sử dụng
Thuộc border-right
tính là một thuộc tính viết tắt cho (theo thứ tự sau):
- border-right-width
- border-right-style (bắt buộc)
- viền-phải-màu
Nếu màu viền-phải bị bỏ qua, màu được áp dụng sẽ là màu của văn bản.
Giá trị mặc định: | vừa không có màu |
---|---|
Thừa hưởng: | không |
Hoạt hình: | có, hãy xem các thuộc tính riêng lẻ . Đọc về hoạt hình |
Phiên bản: | CSS1 |
Cú pháp JavaScript: | object .style.borderRight = "5px dotted blue" |
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-right | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
Cú pháp CSS
border-right: border-width border-style border-color|initial|inherit;
Giá trị tài sản
Value | Description |
---|---|
border-right-width | Required. Specifies the width of the right border. Default value is "medium" |
border-right-style | Required. Specifies the style of the right border. Default value is "none" |
border-right-color | Optional. Specifies the color of the right border. Default value is the color of the text |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Các trang liên quan
Hướng dẫn CSS: Đường viền CSS
Tham chiếu DOM HTML: thuộc tính borderRight