<div class="cp_card">
コンテンツ
<div class="cp_ribbon12">
<div class="cp_ribbon">Ribbon</div>
</div>
</div>
.cp_card {
width: 320px;
height: 340px;
position: relative;
background: #ffffff;
overflow: visible;
margin: 2em auto;
padding: 0.5em;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}
.cp_ribbon12 {
position: absolute;
z-index: 200;
top: 15px;
width: calc(100% + 20px);
height: 50px;
margin-right: -18px;
margin-bottom: 80px;
margin-left: -18px;
}
.cp_ribbon12:before, .cp_ribbon12:after {
position: absolute;
top: 20px;
bottom: -10px;
width: 0;
height: 0;
content: '';
border-width: 20px 20px;
}
.cp_ribbon12:before {
left: -30px;
border-style: solid;
border-color: #F06292 #F06292 #F06292 transparent;
}
.cp_ribbon12:after {
right: -30px;
border-style: solid;
border-color: #F06292 transparent #F06292 #F06292;
}
.cp_ribbon12 .cp_ribbon {
line-height: 3em;
position: relative;
z-index: 100;
height: inherit;
margin-bottom: 0;
text-align: center;
color: #ffffff;
background: #F48FB1;
}
.cp_ribbon12 .cp_ribbon:before, .cp_ribbon12 .cp_ribbon:after {
position: absolute;
bottom: -10px;
width: 0;
height: 0;
content: '';
border-top: 10px solid #C2185B;
}
.cp_ribbon12 .cp_ribbon:before {
left: 0;
border-left: 10px solid transparent;
}
.cp_ribbon12 .cp_ribbon:after {
right: 0;
border-right: 10px solid transparent;
}