
<!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>
<style>
h3, p {
margin: 0px;
}
.flex-ct-x {
display: flex;
justify-content: center;
align-items: center;
}
.mall-ticket {
display: flex;
position: relative;
width: 300px;
height: 100px;
background: radial-gradient(circle at right top, transparent 10px, #f66 0) top left/100px 51% no-repeat, radial-gradient(circle at right bottom, transparent 10px, #f66 0) bottom left/100px 51% no-repeat, radial-gradient(circle at left top, transparent 10px, #ccc 0) top right/200px 51% no-repeat, radial-gradient(circle at left bottom, transparent 10px, #ccc 0) bottom right/200px 51% no-repeat;
-webkit-filter: drop-shadow(2px 2px 2px rgba(255, 255, 255, 0.2));
filter: drop-shadow(2px 2px 2px rgba(255, 255, 255, 0.2));
line-height: 100px;
text-align: center;
color: #fff;
}
.mall-ticket::before {
position: absolute;
left: 100px;
top: 0;
bottom: 0;
margin: auto;
border: 1px dashed #66f;
height: 80px;
content: "";
}
.mall-ticket::after {
position: absolute;
left: 100%;
top: 0;
width: 5px;
height: 100%;
background-image: linear-gradient(180deg, #ccc 5px, transparent 5px, transparent), radial-gradient(10px circle at 5px 10px, transparent 5px, #ccc 5px);
background-size: 5px 15px;
content: "";
}
.mall-ticket h3 {
width: 100px;
font-size: 30px;
}
.mall-ticket p {
flex: 1;
font-weight: bold;
font-size: 18px;
}
</style>
</head>
<body>
<p>
要点:边缘带孔和中间折痕的票劵<br>
场景:电影票、代金券、消费卡
</p>
<div class="bruce flex-ct-x">
<div class="mall-ticket">
<h3>100元</h3>
<p>代金券</p>
</div>
</div>
</body>
</html>