css3边框背景

需要一种3*3格式的小图

<!DOCTYPE html>
<html>
<head>
<title>边框背景</title>
<style type="text/css">
div{
26px;
height: 26px;
margin: 50px auto;
border:dashed 30px red;
border-image-source: url("backImg/border.png");
/*border-image-slice参数可以是数字百分比和fill
规定图像的上、右、下、左侧边缘的向内偏移,图像被分割为九个区域:四个角、四条边以及一个中间区域。除非使用了关键词 fill,否则中间的图像部分会被丢弃
*/
border-image-slice: 26 26 26 26;
border-image-repeat: repeat;
}
</style>
</head>
<body>
<div></div>
</body>
</html>

原文地址:https://www.cnblogs.com/adialike/p/6383740.html