<h3>Solomon Islands</h3>
<div class="flag solomon_islands">
<div class="solomon_islands__stars">
<div class="solomon_islands__group_stars">
<div class="solomon_islands__star"></div>
<div class="solomon_islands__star"></div>
</div>
<div style="margin: -6px 0" class="solomon_islands__star"></div>
<div class="solomon_islands__group_stars">
<div class="solomon_islands__star"></div>
<div class="solomon_islands__star"></div>
</div>
</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;
}
.solomon_islands {
background: linear-gradient(
147deg,
#0051ba 155px,
#fcd116 155px,
#fcd116 175px,
#215b33 0
);
}
.solomon_islands__stars {
position: absolute;
left: 0;
width: 122px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.solomon_islands__group_stars {
margin: 5px;
display: flex;
gap: 35px;
}
.solomon_islands__star {
height: 35px;
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%
);
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.