<div class="cp_card">
コンテンツ
<div class="cp_ribbon07_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_ribbon07_2 {
position: absolute;
top: -6px;
left: 15px;
}
/*リボンの設定*/
.cp_ribbon07_2 .cp_ribbon {
position: relative;
display: flex;
align-items: center;
writing-mode:vertical-rl;
text-orientation: upright;
width: 40px;
padding: 10px 0px 20px;
color: #ffffff;
background: #FFC107;
border-top-left-radius: 3px;
clip-path: polygon(0% 0%, 100% 0, 100% 100%, 50% 90%, 0% 100%);
}
/*リボンの影部分*/
.cp_ribbon07_2:before {
position: absolute;
content: '';
top: 0px;
right: -6px;
width: 6px;
height: 6px;
background-color: #FF8F00;
clip-path: polygon(0 0, 0% 100%, 100% 100%);
}