<div class="cp_card">
コンテンツ
<div class="cp_ribbon08">
<span>Ribbon</span>
</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_ribbon08 {
line-height: 50px;
position: absolute;
top: 20px;
left: -8px;
width: 150px;
height: 50px;
padding-left: 15px;
color: #ffffff;
background: #4CAF50;
}
.cp_ribbon08:before, .cp_ribbon08:after {
position: absolute;
content: '';
}
.cp_ribbon08:before {
top: -8.5px;
left: 0.1px;
width: 0;
height: 0;
border-bottom: 9px solid #2E7D32;
border-left: 9px solid transparent;
}
.cp_ribbon08:after {
right: -14.5px;
width: 0;
height: 0;
border-top: 25px solid transparent;
border-bottom: 25px solid transparent;
border-left: 15px solid #4CAF50;
}