Make Indian flag using single div

In this example below you will see how to do a Make Indian flag using single div with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by raeesh, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright raeesh ©
  • HTML
  • CSS
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>Make Indian flag using single div</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  <div class="myIndia"></div>













<!-- Created By Raeesh Alam -->
<a href="https://codepen.io/raeesh/" target="_blank" style="color:#00c2c0; position: fixed; bottom: 5px; right: 5px; font-size: 15px; text-decoration: none; border: 1px solid #00c2c0; padding: 7px 14px; background: #000; font-family: Arial; letter-spacing:1px;" title="Raeesh Alam">&#10230; Raeesh Alam</a>
  
  

</body>

</html>

/*Downloaded from https://www.codeseek.co/raeesh/make-indian-flag-using-single-div-NgBXdm */
.myIndia{
  width: 100%;
  max-width: 300px;
  height: 150px;
  position: relative;
  margin: 30px auto;
  border-top: 50px solid #FF9933;
  border-bottom: 50px solid #128807;
  -webkit-box-shadow: 0px 5px 20px #777;
  -moz-box-shadow: 0px 5px 20px #777;
  box-shadow: 0px 5px 20px #777;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
.myIndia:before{
  content: '';
  position: absolute;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  left: 50%;
  margin-left: -23px;
  top: 50%;
  margin-top: -23px;
  background:url(http://uiglobe.com/share-images/Ashoka_Chakra.png) center center no-repeat;
  background-size:cover;
  animation: 5s rotating infinite linear;
  -webkit-animation: 5s rotating infinite linear;
  -moz-animation: 5s rotating infinite linear;
}
@keyframes rotating{
  from{ transform:rotate(0deg);}
  to{transform:rotate(360deg);}
}
@-webkit-keyframes rotating{
  from{-webkit-transform:rotate(0deg);}
  to{-webkit-transform:rotate(360deg);}
}
@-moz-keyframes rotating{
  from{-moz-transform:rotate(0deg);}
  to{-moz-transform:rotate(360deg);}
}

Comments