JSFiddle - React, Tailwind, and code Playground
by Sebastian Kay
HTML
<div class="schiff">
<div class="rumpf"></div>
<div class="segel"></div>
</div>
CSS
.schiff {
position: relative;
width: 400px;
height: 300px;
background-color: #000;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
.rumpf {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 100px;
height: 50px;
background-color: #ccc;
clip-path: polygon(0 0, 100% 0, 80% 100%, 20% 100%);
}
.segel {
position: absolute;
top: 20%;
left: 50%;
transform: translate(-50%, -50%);
width: 50px;
height: 50px;
background-color: #ccc;
clip-path: polygon(100% 50%, 0 0, 0 100%);
}
.segel2 {
position: absolute;
top: 20%;
left: 50%;
transform: translate(-50%, -50%);
width: 50px;
height: 50px;
background-color: #ccc;
border-radius: 10px;
}