<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.example{
height: 30px;
width: 322px;
margin-top: 100px;
background-image: repeating-linear-gradient(to right, #000000 0, #000000 0.05em, transparent 0, transparent 5em),
repeating-linear-gradient(to right, #000000 0, #000000 0.05em, transparent 0, transparent 1em);
background-size: 100% 10px, 100% 6px;
background-repeat: no-repeat;
background-position: 0.05em 100%, 0.05em 100%, 0.05em 100%;
border-bottom: 1px solid #000000;
}
</style>
</head>
<body>
<div class='example'></div>
</body>
</html>
假如说啊,假如说是一个图片呢
用遮罩层就可以,底图是完整彩色图片,遮罩挡住不需要显示的部分