Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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

              
                <div style="width: 500px; margin: 0 auto;"><!-- DEMO CONTAINER -->
  <h1 style="text-align: center;">No JS Alerts.</h1>
	<div class="alert error">
		<input type="checkbox" id="alert1"/>
    <label class="close" title="close" for="alert1">
      <i class="icon-remove"></i>
    </label>
		<p class="inner">
			<strong>Warning!</strong> The alerts are too damn awesome!
		</p>
	</div>
	<div class="alert success">
		<input type="checkbox" id="alert2"/>
		<label class="close" title="close" for="alert2">
      <i class="icon-remove"></i>
    </label>
		<p class="inner">
			Your alerts have dismissed successfully.
		</p>
	</div>
	<div class="alert info">
		<input type="checkbox" id="alert3"/>
		<label class="close" title="close" for="alert3">
      <i class="icon-remove"></i>
    </label>
		<p class="inner">
			Here is an info block. Just playing with colours.
			also lets make this one have lots and lots of 
			text to show off what line wrapping looks like.
		</p>
	</div>
	<div class="alert warning">
		<input type="checkbox" id="alert4"/>
		<label class="close" title="close" for="alert4">
      <i class="icon-remove"></i>
    </label>
		<p class="inner">
			Warnings should be orange correct?
		</p>
	</div>
	<div class="alert">
		<input type="checkbox" id="alert5"/>
		<label class="close" title="close" for="alert5">
      <i class="icon-remove"></i>
    </label>
		<p class="inner">
			Standard alert with no 'function' or style specified.
		</p>
	</div>
  <hr> <!-- Container End Visual -->
</div>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Lobster);

@import url(https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css);

body {
  background-image: url(https://subtlepatterns.com/patterns/bedge_grunge.png);
  background-position: initial initial;
  background-repeat: initial initial;
}

h1 {
  font-family: "Lobster";
  font-size: 32pt;
  color: rgb(255, 153, 0);
  text-shadow: 0px 2px 3px rgb(255, 238, 204);
  text-align: center;
  padding: 6px 0px 0px 0px;
  margin: 6px 0px 0px 0px;
}

.alert .inner {
  display: block;
  padding: 6px;
  margin: 6px;
  border-radius: 3px;
  border: 1px solid rgb(180,180,180);
  background-color: rgb(212,212,212);
}

.alert .close {
  float: right;
  margin: 3px 12px 0px 0px;
  cursor: pointer;
}

.alert .inner,.alert .close {
  color: rgb(88,88,88);
}

.alert input {
  display: none;
}

.alert input:checked ~ * {
  animation-name: dismiss,hide;
  animation-duration: 300ms;
  animation-iteration-count: 1;
  animation-timing-function: ease;
  animation-fill-mode: forwards;
  animation-delay: 0s,100ms;
}

.alert.error .inner {
  border: 1px solid rgb(238,211,215);
  background-color: rgb(242,222,222);
}

.alert.error .inner,.alert.error .close {
  color: rgb(185,74,72);
}

.alert.success .inner {
  border: 1px solid rgb(214,233,198);
  background-color: rgb(223,240,216);
}

.alert.success .inner,.alert.success .close {
  color: rgb(70,136,71);
}

.alert.info .inner {
  border: 1px solid rgb(188,232,241);
  background-color: rgb(217,237,247);
}

.alert.info .inner,.alert.info .close {
  color: rgb(58,135,173);
}

.alert.warning .inner {
  border: 1px solid rgb(251,238,213);
  background-color: rgb(252,248,227);
}

.alert.warning .inner,.alert.warning .close {
  color: rgb(192,152,83);
}

@keyframes dismiss {
  0% {
    opacity: 1;
  }
  90%, 100% {
    opacity: 0;
    font-size: 0.1px;
    transform: scale(0);
  }
}

@keyframes hide {
  100% {
    height: 0px;
    width: 0px;
    overflow: hidden;
    margin: 0px;
    padding: 0px;
    border: 0px;
  }
}
  
              
            
!

JS

              
                /*
Technically I import prefixfree.js for the vendor prefixes - but I'm lazy.
*/
              
            
!
999px

Console