Thuộc tính hình ảnh đường viền kiểu
Ví dụ
Chỉ định hình ảnh làm đường viền xung quanh phần tử <div>:
document.getElementById("myDIV").style.borderImage = "url(border.png) 30 30 round";
Hãy tự mình thử »Sự miêu tả
Thuộc tính borderImage là thuộc tính tốc ký để thiết lập các thuộc tính borderImageSource , borderImageSlice , borderImageWidth , borderImageOutset và borderImageRepeat .
Các giá trị bị bỏ qua được đặt thành giá trị mặc định của chúng.
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 | |||||
---|---|---|---|---|---|
borderImage | 16.0 | 11.0 | 15.0 | 6.0 | 15.0 |
Cú pháp
Trả về thuộc tính borderImage:
object .style.borderImage
Đặt thuộc tính borderImage:
object .style.borderImage = "source slice width outset repeat |initial|inherit"
Giá trị tài sản
Value | Description |
---|---|
borderImageSource | The path to the image to be used as a border |
borderImageSlice | The inward offsets of the image-border |
borderImageWidth | The widths of the image-border |
borderImageOutset | The amount by which the border image area extends beyond the border box |
borderImageRepeat | Whether the image-border should be repeated, rounded or stretched |
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 100% 1 0 co dãn |
---|---|
Giá trị trả về: | Một Chuỗi, biểu thị thuộc tính hình ảnh viền của một phần tử |
Phiên bản CSS | CSS3 |
Trang liên quan
Tham chiếu CSS: thuộc tính hình ảnh viền