<div class="cp_card">
コンテンツ
<div class="cp_ribbon06">
<div class="cp_ribbon">Ribbon</div>
</div>
</div>
.cp_card {
position: relative;/*リボンをかけたいコンテンツボックスにセット*/
width: 300px;
height: 300px;
background: #ffffff;
margin: auto;
padding: 5px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}
/*リボンの位置*/
.cp_ribbon06 {
position: absolute;
top: -6.1px;
right: 10px;
}
/*リボンの三角形部分*/
.cp_ribbon06:after {
position: absolute;
content: '';
border-top: 10px solid #4DD0E1;
border-right: 53px solid transparent;
border-left: 53px solid transparent;
}
/*リボン全体の背景*/
.cp_ribbon06 .cp_ribbon {
position: relative;
display: block;
width: 90px;
font-size: 1em;
line-height: 1;
padding: 12px 8px 10px;
text-align: center;
color: #ffffff;
border-top-right-radius: 8px;
background: #4DD0E1;
}
/*リボンの影の部分*/
.cp_ribbon06 .cp_ribbon:before,
.cp_ribbon06 .cp_ribbon:after {
position: absolute;
top: 0;
content: '';
}
.cp_ribbon06 .cp_ribbon:before {
left: -6px;
width: 6px;
height: 6px;
background: #4DD0E1;
}
.cp_ribbon06 .cp_ribbon:after {
left: -8px;
width: 8px;
height: 6px;
border-radius: 8px 8px 0 0;
background: #00ACC1;
}