<div class="coupon">
<div class="price">200<small>元</small></div>
<div class="info">
<h3>新人满减卷</h3>
<p>满800元可用</p>
<p>有效期至2020.12.28</p>
</div>
</div>
body {
display: flex;
align-items: center;
justify-content: center;
text-rendering: optimizeSpeed;
height: 100vh;
background-color: #eee;
}
.coupon {
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: space-around;
width: 300px;
height: 120px;
padding: 0 30px;
box-sizing: border-box;
filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, .2));
border-radius: 4px;
background-image: radial-gradient(circle at right center, transparent, transparent 10px, #fff 10px);
}
.price {
font-size: 44px;
color: red;
font-weight: bold;
}
.price small {
margin-left: 6px;
font-size: 12px;
}
.info h3,
.info p {
margin: 4px;
}
.info p {
font-size: 12px;
color: #666;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.