这个优惠券是一个小的例子,我用最简单的方法写出来的,也有很多复杂的,感觉这种的比较通俗易懂,希望对你们有用。先看下效果,代码在下面。
html+css
.coup{
width: 93%;
margin: 0 auto;
}
.coup_conts{
width: 100%;
background-color: #fff;
border-radius: 10px;
overflow: hidden;
margin-bottom: 10px;
}
.coup_parce{
width: 100%;
display: flex;
justify-content: center;
}
.coup_rig{
width: 100%;
height: 90px;
display: flex;
align-items: center;
justify-content: space-between;
background-color: #ff7d86