Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                <section class="container">
	<h1>Tricolor flag of India #DograsWeblog</h1>
	
	<div class="flag">
		<div class="strip"></div>
		<div class="ashoka-chakra"></div>
		<div class="flag-india">
			<div class="bar"></div>
			<div class="bar"></div>
			<div class="bar"></div>
			<div class="bar"></div>
			<div class="bar"></div>
			<div class="bar"></div>
			<div class="bar"></div>
			<div class="bar"></div>
			<div class="bar"></div>
			<div class="bar"></div>
			<div class="bar"></div>
			<div class="bar"></div>
		</div>
	</div>
	
	<p class="info-text">The National Flag of India is a horizontal rectangular tricolour of India saffron, white and India green; with the Ashoka Chakra, a 24-spoke wheel, in navy blue at its centre. It was adopted in its present form during a meeting of the Constituent Assembly held on 22 July 1947, and it became the official flag of the Dominion of India on 15 August 1947. The flag was subsequently retained as that of the Republic of India. In India, the term "tricolour" (Hindi: तिरंगा, translit. Tiraṅgā) almost always refers to the Indian national flag.<p>
	
	<p style="font-style: italic; color: #2196f3; font-size: 18px; text-align: center; margin-top: 50px; margin-bottom: 20px;">Follow me on Twitter: <a href="https://twitter.com/mrdogra007/" target="_blank">@mrdogra007</a></p>
</section>
              
            
!

CSS

              
                *{margin: 0;padding: 0;}
html{ min-height: 100%; position: relative;}
h1 { font-size: 36px; margin-top: 40px; margin-bottom: 10px; text-align: center; font-weight: 800;}
.flag { position: relative; min-height: 600px; width: 330px; margin: auto;}
.info-text { text-align: center; padding: 0 50px; margin-top: 30px; font-size: 20px; line-height: 1.6; font-weight: 200; color: #282828;}
.flag-ico { position: relative; width: 300px; height: 180px; top: -80px; text-align: center; z-index: 9999;}
.flag-ico img { max-width: 80px;}
.strip { width: 10px; height: 50px; margin: 0; position: relative;}
.flag-india { width: 300px; height: 60px; margin: 0; margin-top: 120px; position: relative; background: #ffffff;}
.flag-india:before { content: ''; position: absolute; width: 300px; height: 60px; z-index: 0; top: -60px; background-image: -webkit-linear-gradient(0deg, #ff9933 0%, #f78e26 30% ,#f78e26 70%, #fc8712 100%); border-radius: 0 3px 0 0;}
.flag-india:after { content: ''; position: absolute; width: 300px; height: 60px; z-index: 0; top: 60px; background-image: -webkit-linear-gradient(0deg, #128807 0%, #118d05 30% ,#118d05 70%, #138309 100%); border-radius: 0 0 3px 0;}
.strip:before{ content: ''; position: absolute; width: 15px; height: 500px; top: 70px; left: -15px; z-index: -2; background-image: -webkit-linear-gradient(0deg, #cbcbcb 0%, #ebebeb 30% ,#ebebeb 70%, #cbcbcb 100%); border-radius: 5px 5px 0 0;}
.strip:after{ content: ''; position: absolute; width: 90px; height: 35px; bottom: -555px; left: -90px; margin-left: 35px; background-image: -webkit-linear-gradient(0deg, #373737 0%, #5b5b5b 30% ,#5b5b5b 70%, #373737 100%); border-radius: 35px 35px 0 0;}
.bar { position: absolute; display: inline-block; height: 60px; width: 1px; background: #000088; left:50%;}
.ashoka-chakra { content: ''; z-index: 9999; position: absolute; width: 61px; height: 61px; border: 1px solid #000088; border-radius: 50%; top: 169px; left:50%; margin-left: -46px;}
.bar:nth-child(1) { -ms-transform: rotate(15deg); -webkit-transform: rotate(15deg); transform: rotate(15deg);}
.bar:nth-child(2) { -ms-transform: rotate(30deg); -webkit-transform: rotate(30deg); transform: rotate(30deg);}
.bar:nth-child(3) { -ms-transform: rotate(45deg); -webkit-transform: rotate(45deg); transform: rotate(45deg);}
.bar:nth-child(4) { -ms-transform: rotate(60deg); -webkit-transform: rotate(60deg); transform: rotate(60deg);}
.bar:nth-child(5) { -ms-transform: rotate(75deg); -webkit-transform: rotate(75deg); transform: rotate(75deg);}
.bar:nth-child(6) { -ms-transform: rotate(90deg); -webkit-transform: rotate(90deg); transform: rotate(90deg);}
.bar:nth-child(7) { -ms-transform: rotate(105deg); -webkit-transform: rotate(105deg); transform: rotate(105deg);}
.bar:nth-child(8) { -ms-transform: rotate(120deg); -webkit-transform: rotate(120deg); transform: rotate(120deg);}
.bar:nth-child(9) { -ms-transform: rotate(135deg); -webkit-transform: rotate(135deg); transform: rotate(135deg);}
.bar:nth-child(10) { -ms-transform: rotate(150deg); -webkit-transform: rotate(150deg); transform: rotate(150deg);}
.bar:nth-child(11) { -ms-transform: rotate(165deg); -webkit-transform: rotate(165deg); transform: rotate(165deg);}
.bar:nth-child(12) { -ms-transform: rotate(180deg); -webkit-transform: rotate(180deg); transform: rotate(180deg);}
              
            
!

JS

              
                // Flag of India
// Deigned by Nishant Dogra
// Date: 07/12/2017
// Twitter: @mrdogra007
// Web: https://hindustan360.in
              
            
!
999px

Console