<div class="cp_card">
コンテンツ
<div class="cp_ribbon03">
<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_ribbon03 {
width: 114px;
height: 103px;
overflow: hidden;
position: absolute;
bottom: -4px;
right: -6px;
}
.cp_ribbon03 .cp_ribbon {
position: relative;
bottom: -45px;
right: 0px;
font-size: 1em;
line-height: 1.2em;
width: 150px;
padding: 7px 0;
transform: rotate(-45deg);
text-align: center;
letter-spacing: 0.5px;
color: #ffffff;
background-color: #009688;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.cp_ribbon03 .cp_ribbon::before,
.cp_ribbon03 .cp_ribbon::after {
position: absolute;
top: -4px;
content: '';
border-width: 4px 4px 0 4px;
border-style: solid;
border-color: transparent transparent transparent #00695C;
}
.cp_ribbon03 .cp_ribbon:before {
left: 0;
}
.cp_ribbon03 .cp_ribbon:after {
right: 2px;
border-width: 0 4px 4px 4px;
border-color: transparent #00695C #00695C transparent;
}