Is it possible to create css ribbon in corner shaped?
.
I've tried with an png image, but is there any option to create using css ? should work with responsive views also.
.container {
width: 200px;
height: 200px;
position: relative;
margin: 20px;
overflow: hidden;
}
.box {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
opacity: 0.8; /* for demo purpose */
}
.stack-top {
height: 30px;
z-index: 9;
margin: 40px; /* for demo purpose */
transform: rotateY(0deg) rotate(45deg); /* needs Y at 0 deg to behave properly*/
transition: transform 2s;
color: #fff;
}
<div class="container">
<div class="box" style="background: #fffff3;"></div>
<div class="box stack-top" style="background: #242424;"> 1Month</div>
</div>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…