效果
代码实现
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<style>
.list {
width: 569px;
margin: auto;
margin-bottom: 10px;
}
.list:before {
content: '';
width: 569px;
height: 19px;
display: block;
background-image: url('./img/list-top.png');
background-repeat: no-repeat;
}
.list-content {
background-image: url('./img/list-middle.png');
background-repeat: repeat-y;
height: 100px;
}
.list::after {
content: '';
width: 569px;
height: 19px;
display: block;
background-image: url('./img/list-bottom.png');
background-repeat: no-repeat;
}
</style>
<body>
<div class="list">
<div class="list-content">
</div>
</div>
</body>
<script>
</script>
</html>
图片资源
list-top.png
list-middle.png
list-bottom.png