<div class="cp_card">
コンテンツ
<div class="cp_ribbon05">
<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_ribbon05 {
position: absolute;
top: -6px;
right: -6px;
overflow: hidden;
width: 108px;
height: 108px;
}
.cp_ribbon05 .cp_ribbon {
position: relative;
top: 26px;
left: -4px;
font-size: 1em;
line-height: 1.2em;
width: 150px;
padding: 7px 0;
text-align: center;
letter-spacing: 0.5px;
color: #ffffff;
border: 1px dashed #ffffff;
box-shadow: 0px 0px 0px 3px #F48FB1;
background-color: #F48FB1;
transform: rotate(45deg);
}
/*リボンの影の部分*/
.cp_ribbon05 .cp_ribbon:before,
.cp_ribbon05 .cp_ribbon:after {
position: absolute;
bottom: -8px;
content: '';
border-width: 4px 4px 0 4px;
border-style: solid;
border-color: #EC407A transparent transparent transparent;
}
.cp_ribbon05 .cp_ribbon:before {
left: -4px;
}
.cp_ribbon05 .cp_ribbon:after {
right: 3px;
}