<h3>East Timor</h3>
<div class="flag east_timor">
<div class="east_timor__star"></div>
</div>
* {
box-sizing: border-box;
margin: 0;
}
body {
width: 100%;
height: 100vh;
background-color: rgb(221, 239, 255);
display: grid;
place-items: center;
font-family: cursive;
font-weight: bold;
}
h3 {
position: absolute;
text-align: center;
top: 20px;
}
/* Main Style Stars from here */
.flag {
position: relative;
width: 300px;
height: 200px;
box-shadow: 0 0 1px rgba(0, 0, 0, 0.5);
overflow: hidden;
}
.east_timor {
background-color: #da291c;
}
.east_timor::before {
position: absolute;
content: "";
border: 100px solid #da291c;
border-left: 150px solid #ffc72c;
}
.east_timor::after {
position: absolute;
content: "";
left: 0;
border: 100px solid transparent;
border-left: 100px solid black;
}
.east_timor__star {
transform: rotate(-25deg);
position: absolute;
left: 3%;
top: 35%;
width: 55px;
aspect-ratio: 1;
background-color: white;
clip-path: polygon(
50% 0%,
61% 35%,
98% 35%,
68% 57%,
79% 91%,
50% 70%,
21% 91%,
32% 57%,
2% 35%,
39% 35%
);
z-index: 1;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.