css3背景多图

<!DOCTYPE html>
<html>
<head>
<title>背景多图</title>
<style type="text/css">
div{
height: 300px;
300px;
border:dashed 20px;
/*背景多图和写多个盒阴影的时候一样可以用逗号隔开写个参数
background设置的是一个属性集合是和我们学到的background-* 的集合*/
background:url(img2/bg-leftTop.png) no-repeat left top,
url(img2/bg-rightTop.png) no-repeat right top,
url(img2/bg-rightBottom.png) no-repeat right bottom,
url(img2/bg-leftBottom.png) no-repeat left bottom,
url(img2/bg-repeat.png);
background-origin: border-box;
}

</style>
</head>
<body>
<div></div>
</body>
</html>

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