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

              
                <html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
  <div class="wrapper">
    
<!--     Header -->
    <header class="header">
     <div class="logo">
       <span class="line"></span>
       <span class="line-middle"></span>
       <span class="line"></span>
      </div>
      <div class="heading">Fabstract</div>
      <i class="fa fa-bars fa-lg"></i>
    </header>
    
<!--     Main -->
    <main class="main">
      <div class="home-content">
        <h2 id="home-header-first">Nature's</h2>
        <h2 id="home-header-second">Candy</h2>
      </div>
      <div class="image-container">
        <img src="https://images.unsplash.com/photo-1481349518771-20055b2a7b24?ixlib=rb-0.3.5&q=85&fm=jpg&crop=entropy&cs=srgb&ixid=eyJhcHBfaWQiOjE0NTg5fQ&s=5316f5e28c03cf83113182db0ee6d0c1" alt="" class="image"> 
      </div>
      
      <div class="image-container">
        <img src="https://images.unsplash.com/photo-1528488973032-1d4818f491a8?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=172a824f0c663cc4e30f4acd0a2d350b&auto=format&fit=crop&w=500&q=60" alt="" class="image">
      </div>
      
      <div class="image-container">
        <img src="https://images.unsplash.com/photo-1494253109108-2e30c049369b?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=02261b49dc587eaecb3dfae7ccfbbcaa&auto=format&fit=crop&w=500&q=60" alt="" class="image">
      </div>
     
    </main>
    
<!--     Footer -->
    <footer class="footer">
     <div class="footer-heading">Fruits galore!</div>
      <div id="page-number-js" class="page-number">
        <div class="number">01</div>
        <div class="number">02</div>
        <div class="number">03</div>
      </div>
    </footer>
  </div>
</body>
</html>
              
            
!

CSS

              
                body {
  margin: 0;
  padding: 0;
}

.wrapper {
  margin: 20px auto;
  width: 700px;
  height: 500px;
  overflow: hidden;
  background-color: #FF80AB;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  animation: bgChange 6s ease-in-out alternate infinite;
  .header, .footer {
    height: 50px;
  }
  .header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    font-family: century gothic;
    .logo {
      width: 30px;
      margin-left: 15px;
      display: flex;
      flex-direction: row;
      justify-content: center;
      align-items: center;
      .line, .line-middle {
        margin: 0 2px;
        width: 4px;
        background-color: white;
      }
      .line {
        height: 20px;
      }
      .line-middle {
        height: 12px;
      }
    }
    .heading {
      font-weight: bold;
      text-transform: uppercase;
      letter-spacing: 5px;
    }
    .fa-bars {
      margin-right: 15px;
    }
  }
  .main {
    width: 2100px;
    height: calc(500px - 90px);
    display: flex;
    .home-content {
      position: absolute;
      z-index: 5;
      margin-left: 25px;
      height: 410px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      font-family: century gothic;
      font-size: 40px;
      text-transform: uppercase;
      #home-header-first, #home-header-second {
        letter-spacing: 7px;
      }
      #home-header-first {
        margin-bottom: 0;
      }
      #home-header-second {
        margin-top: 0;
        -webkit-text-fill-color: transparent;
        -webkit-text-stroke-color: white;
        -webkit-text-stroke-width: 1px;
      }
    }
    .image-container {
      width: 700px;
      height: 415px;
      display: flex;
      justify-content: center;
      position: relative;
      animation: imageSlide 6s ease-in alternate infinite;
      .image {
        width: 330px;
        height: 415px;
        position: absolute;
      }
    }

  }
  .footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: century gothic;      
    font-size: 16px;
    .footer-heading {
      margin-left: 25px;
      letter-spacing: 1.4px;
      font-weight: bold;
    }
    .page-number {
      width: 16px;
      height: 20px;
      margin-right: 25px;
      overflow: hidden;
      display: flex;
      .number {
        position: relative;      
        animation: numberChange 6s ease-in alternate infinite;
      }
    }
  }
}

@keyframes imageSlide {
  0% {
    right: 0px;
  }
  20% {
    right: 0;
  }
  40% {
    right: 700px;
  }
  60% {
    right: 700px;
  }
  80% {
    right: 1400px;
  }
  100% {
    right: 1400px;
  }
}

@keyframes bgChange {
  0% {
    background-color:#FF80AB;
  }
  50% {
    background-color: #93213e;//#761830;//#9575CD;
  }
  100% {
    background-color: #1565C0;
  }
}

@keyframes numberChange {
  0% {
    right: 0px;
  }
  20% {
    right: 0;
  }
  40% {
    right: 18px;
  }
  60% {
    right: 18px;
  }
  80% {
    right: 36px;
  }
  100% {
    right: 36px;
  }
}
              
            
!

JS

              
                

              
            
!
999px

Console