Thuộc tính style borderImageSlice
Ví dụ
Chỉ định độ lệch vào trong của đường viền hình ảnh:
document.getElementById("myDIV").style.borderImageSlice = "50% 10%";
Hãy tự mình thử »Sự miêu tả
Thuộc tính borderImageSlice chỉ định độ lệch vào trong của đường viền hình ảnh.
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 | |||||
---|---|---|---|---|---|
borderImageSlice | Yes | 11.0 | Yes | 6.0 | 15.0 |
Thay vào đó hãy nhìn vào thuộc tính borderImage !
Cú pháp
Trả về thuộc tính borderImageSlice:
object .style.borderImageSlice
Đặt thuộc tính borderImageSlice:
object .style.borderImageSlice = "number | % |fill|initial|inherit"
Giá trị tài sản
Value | Description |
---|---|
number | Numbers represent pixels in the image (if the image is a raster image) or vector coordinates (if the image is a vector image) |
% | Percentages are relative to the size of the image: the width of the image for the horizontal offsets, the height for vertical offsets. Default value is 100% |
fill | Causes the middle part of the border-image to be preserved |
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: | 100% |
---|---|
Giá trị trả về: | Một Chuỗi, biểu thị thuộc tính lát cắt hình ảnh viền của một phần tử |
Phiên bản CSS | CSS3 |
Trang liên quan
Tham khảo CSS: thuộc tính border-image-slice