JSFiddle - React, Tailwind, and code Playground
by stic_k
HTML
<div class="wrap">
<div class="block">
<div class="close">
<span></span>
<span></span>
</div>
</div>
</div>
CSS
.wrap {
background: #aaa;
padding: 20px;
}
.block {
position: relative;
width: 200px;
height: 300px;
background: #000;
border-radius: 30px;
}
.block::before {
position: absolute;
z-index: 1;
content: "";
top: 0;
right: 0;
border: 35px solid transparent; border-top: 35px solid #fff; border-right: 35px solid #fff;
border-top-right-radius: 30px;
}
.close {
position: absolute;
z-index: 2;
width: 30px;
height: 30px;
top: 5px;
right: 5px;
}
.close span {
position: absolute;
width: 90%;
height: 5px;
background: #000;
top: 50%;
left: 0;
transform: translateY(-50%);
}
.close span:first-child {
transform: rotate(45deg);
}
.close span:last-child {
transform: rotate(-45deg);
}