边框背景
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
div{
width: 300px;
height: 300px;
margin: 100px auto;
box-sizing: border-box;
border: 70px solid #000;
border-image-source: url("../a/ad6.jpg");
border-image-slice: 100 100 100 100;
/*沿每个顶点的的距离切割,如果要显示中间的在最后加上fill*/
border-image-width: 70px;
/*设置边框图片的距离,但是设置次属性边框宽度将失效*/
border-image-repeat: stretch;
/*设置边框图片的展示方式,默认是stretch拉伸,还有round铺满,repeat平铺*/
border-image-outset: 10px 10px 10px 10px;
/*设置边框图片超出边框的量*/
border-image:url("../a/ad6.jpg") 70 stretch;
/*连写*/
}
</style>
</head>
<body>
<div></div>
</body>
</html>
网友评论