<h3>Tunisia</h3>
<div class="flag tunisia"></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;
}
.tunisia {
background: radial-gradient(
circle at center,
#e70013 40px,
white 40px,
white 50px,
#e70013 0
);
}
/* Tunisia Center circle Whitle */
.tunisia::before {
position: absolute;
content: "";
width: 65px;
height: 65px;
border-radius: 1in;
background-color: white;
left: 127px;
top: calc(50% - 33.5px);
}
/* Tunisia Star */
.tunisia::after {
position: absolute;
content: "";
height: 50px;
aspect-ratio: 1;
background: #e70013;
clip-path: polygon(
50% 0%,
61% 35%,
98% 35%,
68% 57%,
79% 91%,
50% 70%,
21% 91%,
32% 57%,
2% 35%,
39% 35%
);
transform: rotate(-15deg);
left: 45%;
top: calc(50% - 25px);
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.