property
border-image-slice — CSS reference
Sets inward offsets in the source image. Initial 100%; not inherited. Numbers represent image-space units and percentages use the corresponding source dimension. The center is discarded unless fill is specified. Four slices follow top/right/bottom/left order. Large opposing slices may leave no edge region.
Formal Syntax & Structure
css syntaxcss
[ <number [0,∞]> | <percentage [0,∞]> ]{1,4} && fill?Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS visual effects lab</title><style>body {margin:0} .sample {background:#dcebe9;color:#182e32}body{background:white} #a{position:relative; margin:20px;width:80px;height:60px;background:rgb(255,0,0);box-sizing:content-box} #a{border:10px solid green;border-image-source:linear-gradient(blue,blue);border-image-slice:1;border-image-slice:1 fill}</style><body><div id="a" aria-hidden="true"></div><p>Decorative effect example.</p></body></html>