<div class="cp_card">
コンテンツ
<div class="cp_ribbon06_2">
<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_2 {
position: absolute;
top: -6px;
right: 10px;
}
/*リボン全体の背景*/
.cp_ribbon06_2 .cp_ribbon {
position: relative;
display: block;
width: 90px;
font-size: 1em;
line-height: 1;
padding: 12px 0px 12px;
text-align: center;
color: #ffffff;
border-top-right-radius: 8px;
background: #4DD0E1;
clip-path: polygon(0% 0%, 100% 0, 100% 85%, 50% 100%, 0 85%);
}
/*リボンの影の部分*/
.cp_ribbon06_2::before,
.cp_ribbon06_2::after {
position: absolute;
content: '';
}
.cp_ribbon06_2::before {/*リボンの影上のラウンドの部分*/
top: 0;
left: -5px;
width: 5px;
height: 5px;
background: #4DD0E1;
}
.cp_ribbon06_2::after {/*リボンの影の半円の部分*/
top: -5px;
left: -10px;
width: 10px;
height: 10px;
background: #00ACC1;
clip-path: circle(50.0% at 50% 100%);
}