css优惠券制作

2018-01-25

red-demo

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<div class="red-wrap">
<div class="red-left">
<div class="money">50元</div>
<div class="circle"></div>
</div>
<div class="red-right">
<div class="tips">
<p>现金券</p>
<p>可用于实体超市</p>
<p><span>有效期:2017年01月01日~2018年01月01日</span></p>
</div>
<div class="wave wave-in"></div>
<div class="wave wave-out"></div>
</div>
</div>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
*{
margin: 0;
padding: 0;
}
.red-wrap:before,.red-wrap:after{
display: table;
content: '';
}
.red-wrap:after{
clear: both;
}
.red-left,.red-right{
float: left;
position: relative;
height: 110px;
background-color: #ff7373;
}
.red-left{
width: 80px;
border-top-left-radius: 6px;
border-bottom-left-radius: 6px;
}
.money{
text-align: right;
color: #fff;
padding-right: 10px;
line-height: 110px;
font-size: 22px;
}
.circle{
position: absolute;
width: 20px;
height: 20px;
left: -10px;
top: 50%;
margin-top: -10px;
border-radius: 50%;
background: #fff;
}
.red-right{
width: 140px;
padding-left: 1em;
padding-right: 1em;
margin-left: 5px;
}
.tips{
max-width: 10em;
margin-top: 0.5em;
}
.tips p{
line-height: 1.5;
color: #fff;
}
.tips span{
font-size: 12px;
}
.wave{
position: absolute;
top: 0;
width: 9px;
height: 100%;

}
.wave-in{
right: 0;
background-size: 18px 36px;
background-repeat: repeat-y;
background-position: 2px -2px;
background-image: radial-gradient(circle,#fff,#fff 8px,#fff 0,#ff7373 9px,#ff7373 0,#ff7373);
}
.wave-out{
right:-9px;
background-size: 20px 36px;
background-position: -11px -20px;
background-image: radial-gradient(circle, #ff7373, #ff7373 9px, transparent 10px, transparent 10px, transparent 10px, transparent);
}