Đường viền kiểu dáng
Thí dụ
Chỉ định các khoảng lệch hướng vào trong của đường viền hình ảnh:
document.getElementById("myDIV").style.borderImageSlice = "50% 10%";
Định nghĩa và Cách sử dụng
Thuộc tính borderImageSlice chỉ định phần bù 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 11.0 O |
Thay vào đó, hãy nhìn vào thuộc tính borderImage !
Cú pháp
Trả lại 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ả lại: | Một chuỗi, đại diện cho thuộc tính viền-hình ảnh-lát cắt của một phần tử |
Phiên bản CSS | CSS3 |
Các trang liên quan
Tham chiếu CSS: thuộc tính border-image-slice