The content on this website, including videos and code examples, is for educational purposes only. All demonstrations and designs are fictional and created to illustrate coding techniques. Any resemblance to existing websites or brands is purely coincidental.
The creators and administrators of this website do not claim ownership or affiliation with any existing websites or companies. Users are encouraged to use the information responsibly for learning purposes. Liability for any misuse of the content provided is not accepted.
Below is the html code for this video.
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Indian Flag</title>
<link href="style.css" rel="stylesheet" />
</head>
<body>
<div class="center-container">
<div class="wrapper">
<div class="stick"></div>
<div class="flag">
<div class="stripe stripe1"></div>
<div class="stripe stripe2">
<div class="ashok">
<div class="spoke spoke1"></div>
<div class="spoke spoke2"></div>
<div class="spoke spoke3"></div>
<div class="spoke spoke4"></div>
<div class="spoke spoke5"></div>
<div class="spoke spoke6"></div>
<div class="spoke spoke7"></div>
<div class="spoke spoke8"></div>
<div class="spoke spoke9"></div>
<div class="spoke spoke10"></div>
<div class="spoke spoke11"></div>
<div class="spoke spoke12"></div>
<div class="spoke spoke13"></div>
<div class="spoke spoke14"></div>
<div class="spoke spoke15"></div>
<div class="spoke spoke16"></div>
<div class="spoke spoke17"></div>
<div class="spoke spoke18"></div>
<div class="spoke spoke19"></div>
<div class="spoke spoke20"></div>
<div class="spoke spoke21"></div>
<div class="spoke spoke22"></div>
<div class="spoke spoke23"></div>
<div class="spoke spoke24"></div>
</div>
</div>
<div class="stripe stripe3"></div>
</div>
<div class="stand"></div>
</div>
</div>
</body>
</html>
Below is the css code for this video.
style.css
html, body {
margin: 0;
padding: 0;
width: 100%;
height: 100vh;
background-color: #87ceeb;
}
.center-container {
top: 50%;
left: 50%;
position: absolute;
transform: translate(-50%, -50%);
}
.wrapper {
display: flex;
}
.stick {
height: 600px;
width: 10px;
background-color: #000000;
border-top-left-radius: 10px;
}
.flag {
font-size: 30px;
width: 405px;
height: 270px;
box-shadow: 5px 5px 10px 5px #999;
}
.stand {
width: 135px;
height: 35px;
background-color: #000;
margin-top: auto;
position: relative;
left: -480px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
.stripe {
height: 33.33%;
box-sizing: border-box;
}
.stripe1 {
background-color: #ff9933;
}
.stripe2 {
padding: 4.5px;
background-color: #ffffff;
}
.stripe3 {
background-color: #138808;
}
.ashok {
width: 72px;
height: 72px;
position: relative;
border: 4.5px solid #000080;
border-radius: 50%;
margin: 0 auto;
}
.ashok:before {
content: "";
position: absolute;
top: 29.25px;
left: 29.25px;
width: 13.5px;
height: 13.5px;
background-color: #000080;
border-radius: 50%;
}
.spoke {
width: 4.5px;
height: 0;
position: absolute;
top: 34.875px;
left: 36px;
border-top: 1.125px solid transparent;
border-right: 9px solid #000080;
border-bottom: 1.125px solid transparent;
transform-origin: 0 1.125px;
}
.spoke:before {
content: "";
position: absolute;
width: 0;
height: 0;
top: -1.125px;
left: 13.5px;
border-top: 1.125px solid transparent;
border-left: 22.5px solid #000080;
border-bottom: 1.125px solid transparent;
}
.spoke:after {
content: "";
position: absolute;
width: 3.6px;
height: 3.6px;
top: 2.97px;
left: 34.2px;
background-color: #000080;
border-radius: 50%;
}
.spoke1 {
transform: rotate(0deg);
}
.spoke2 {
transform: rotate(15deg);
}
.spoke3 {
transform: rotate(30deg);
}
.spoke4 {
transform: rotate(45deg);
}
.spoke5 {
transform: rotate(60deg);
}
.spoke6 {
transform: rotate(75deg);
}
.spoke7 {
transform: rotate(90deg);
}
.spoke8 {
transform: rotate(105deg);
}
.spoke9 {
transform: rotate(120deg);
}
.spoke10 {
transform: rotate(135deg);
}
.spoke11 {
transform: rotate(150deg);
}
.spoke12 {
transform: rotate(165deg);
}
.spoke13 {
transform: rotate(180deg);
}
.spoke14 {
transform: rotate(195deg);
}
.spoke15 {
transform: rotate(210deg);
}
.spoke16 {
transform: rotate(225deg);
}
.spoke17 {
transform: rotate(240deg);
}
.spoke18 {
transform: rotate(255deg);
}
.spoke19 {
transform: rotate(270deg);
}
.spoke20 {
transform: rotate(285deg);
}
.spoke21 {
transform: rotate(300deg);
}
.spoke22 {
transform: rotate(315deg);
}
.spoke23 {
transform: rotate(330deg);
}
.spoke24 {
transform: rotate(345deg);
}
Thanks for visiting