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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

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

              
                <label for="notify-1">
  <input id="notify-1" type="checkbox">
  <div id="notification-bar">
    <div class="container">
      <i class="fa fa-times-circle"></i>
      <p>
        <i class="fa fa-gift"></i><strong>Awesome notification bar!</strong> Add to your website.
      </p>
      <a class="btn-action" href="#">Click here</a>
    </div>
  </div>
</label>

<label for="notify-2">
  <input id="notify-2" type="checkbox">
  <i class="fa fa-long-arrow-down"></i>
  <div id="notification-bar">

    <div class="container">
      <i class="fa fa-times-circle"></i>
      <i class="fa fa-newspaper-o"></i>
      <p>Subscribe to the Newsletter:</p>
      <input type="text" placeholder="Email">
      <a class="btn-action" href="#">Submit</a>
    </div>
  </div>
</label>

<div class="find-me">Find me through <a href="https://andreaseracleous.com/" target="_blank">my website</a></div>
              
            
!

CSS

              
                body {
  margin: 0;
  padding: 0;
  font-family: 'Open Sans', sans-serif;
  background-color: #333;
}

.wrapper {
  position: relative;
  width: 960px;
  margin: 0 auto;
}

h1 {
  color: #fff;
}

.block {
  display: block;
}

.hide {
  display: none;
}

#notification-bar {
  position: fixed;
  width: 100%;
  top: 0;
  background-color: #444;
  border-bottom: 1px solid #333;
  clear: both;
  z-index: 999;
}

#notification-bar .container {
  width: 800px;
  height: 45px;
  margin: 0 auto;
  padding: 5px;
  background-color: #444;
}

#notification-bar .fa-gift,
#notification-bar .fa-newspaper-o {
  display: inline-block;
  font-size: 45px;
  float: left;
  margin-right: 20px;
  color: #ffbe03;
}

#notification-bar p {
  display: inline-block;
  font-family: 'Open Sans', sans-serif;
  font-size: 18px;
  font-weight: 300;
  float: left;
  margin: 0 25px 0 0;
  padding: 0;
  line-height: 45px;
  color: #fff;
}

#notification-bar a.btn-action {
  display: inline-block;
  width: 110px;
  height: 35px;
  line-height: 35px;
  margin-top: 5px;
  padding: 0px 12px;
  float: right;
  margin-right: 50px;
  font-family: 'Roboto', sans-serif;
  font-size: 18px;
  font-weight: bold;
  /* Safari 3-4, iOS 1-3.2, Android 1.6- */
  
  -webkit-border-radius: 5px;
  /* Firefox 1-3.6 */
  
  -moz-border-radius: 5px;
  /* Opera 10.5, IE 9, Safari 5, Chrome, Firefox 4, iOS 4, Android 2.1+ */
  
  border-radius: 5px;
  text-align: center;
  background-color: #ffbe03;
  color: #111;
  text-decoration: none;
}

#notification-bar a.btn-action:hover {
  background-color: #ffd24d;
}

input[type=checkbox] {
  position: absolute;
  top: -9999px;
  left: -9999px;
}

.fa-times-circle {
  float: right;
  margin-top: 8px;
  font-size: 30px;
  color: #222;
  text-align: right;
  z-index: 9;
  cursor: pointer;
}

.fa-times-circle:hover {
  color: #fff;
}

input[type=text] {
  width: 230px;
  height: 30px;
  font-size: 18px;
  margin: 5px 0 0 0;
  padding: 0 0 0 5px;
  border: 1px solid #555;
  /* Safari 3-4, iOS 1-3.2, Android 1.6- */
  
  -webkit-border-radius: 3px;
  /* Firefox 1-3.6 */
  
  -moz-border-radius: 3px;
  /* Opera 10.5, IE 9, Safari 5, Chrome, Firefox 4, iOS 4, Android 2.1+ */
  
  border-radius: 3px;
}

input[type=text] + input[type=text] {
  margin-left: 10px;
}
/* Initial bar stage  */

input[type=checkbox] ~ #notification-bar {
  /* Animation */
  
  -webkit-animation-duration: 1s;
  animation-duration: 1s;
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
  /* Start animation to go down */
  
  -webkit-animation-name: goDown;
  animation-name: goDown;
}
/* Close the bar */

input[type=checkbox]:checked ~ #notification-bar {
  /* Animation */
  
  -webkit-animation-duration: 1s;
  animation-duration: 1s;
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
  /* Start animation to go up */
  
  -webkit-animation-name: goUp;
  animation-name: goUp;
}

input[type=checkbox] ~ .fa-long-arrow-down {
  position: absolute;
  display: none;
  right: 10%;
  cursor: pointer;
}

input[type=checkbox]:checked ~ .fa-long-arrow-down {
  display: block;
  top: -35px;
  padding: 10px;
  font-size: 50px;
  color: #ffbe03;
  background-color: #444;
  /* Safari 3-4, iOS 1-3.2, Android 1.6- */
  
  -webkit-border-radius: 5px;
  /* Firefox 1-3.6 */
  
  -moz-border-radius: 5px;
  /* Opera 10.5, IE 9, Safari 5, Chrome, Firefox 4, iOS 4, Android 2.1+ */
  
  border-radius: 5px;
}

input[type=checkbox]:checked ~ .fa-long-arrow-down:hover {
  top: -15px;
  color: #ccc;
}
/* ANIMATION for go up */

@-webkit-keyframes goUp {
  0% {
    -webkit-transform: none;
    transform: none;
  }
  100% {
    -webkit-transform: translate3d(0, -100px, 0);
    transform: translate3d(0, -100px, 0);
  }
}

@keyframes goUp {
  0% {
    -webkit-transform: none;
    transform: none;
  }
  100% {
    -webkit-transform: translate3d(0, -100px, 0);
    transform: translate3d(0, -100px, 0);
  }
}
/* ANIMATION for go down */

@-webkit-keyframes goDown {
  0% {
    -webkit-transform: translate3d(0, -100%, 0);
    transform: translate3d(0, -100%, 0);
  }
  100% {
    -webkit-transform: none;
    transform: none;
  }
}

@keyframes goDown {
  0% {
    -webkit-transform: translate3d(0, -100%, 0);
    transform: translate3d(0, -100%, 0);
  }
  100% {
    -webkit-transform: none;
    transform: none;
  }
}

.find-me {
  position: relative;
  margin: 100px;
  color: #fff;
}

.find-me a {
  color: #fff;
}
              
            
!

JS

              
                
              
            
!
999px

Console