123

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

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.

            
              <div class="wrapper container">
  <h1>Example page</h1>
  
  <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Cumque, voluptate corrupti nam adipisci ad enim accusantium iusto distinctio non fugiat esse. Fugiat neque enim pariatur voluptas numquam nemo dolorum doloribus.</p>
  
  <p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Nisi itaque aut inventore ratione quasi explicabo consequatur laboriosam temporibus, illo architecto reiciendis dignissimos pariatur facilis, neque officiis doloremque doloribus. Minima, blanditiis!</p>
  <p>Laborum molestias aspernatur quibusdam ex officia ad eos a soluta et assumenda, odit sequi ipsa, maiores provident fugit similique animi harum aut minima. Ut autem pariatur facilis eligendi veritatis sequi!</p>
  <p>Eos nemo nisi facere quisquam nostrum commodi ab illo labore atque sed, neque quidem molestias facilis accusantium doloribus doloremque temporibus. Autem natus, libero minima vero quod quaerat voluptatum accusamus quasi?</p>
  <p>Quasi, in rerum omnis fugit ducimus commodi error quia hic harum obcaecati repudiandae totam asperiores, accusamus sapiente laboriosam veniam odio soluta ea quis distinctio. Libero illum repellendus ratione placeat odio!</p>
  <p>In voluptates quos quas delectus, voluptatibus itaque a tenetur magni fuga vero maxime sint eveniet rem, quis eaque optio eius repudiandae ratione dicta totam? Id consequatur quaerat suscipit a rerum.</p>
  <p>Facere aliquam ea tenetur earum molestiae! Earum quod sunt est rerum ipsa ut? Autem quas obcaecati porro ipsum eum quibusdam, cupiditate doloribus omnis, cum corporis itaque, ex ut iusto modi.</p>
</div>

<div class="modal">
  <div class="modal-inner container">
    <h3>Modal</h3>
    
    <p>After a 1s delay, <code>.modal</code> (and contents) fade-in using a basic CSS animation. This uses no JS or jQuery.</p>
  </div>
</div>
            
          
!
            
              html {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #F6D0BF;
  font-size: 18px;
  line-height: 1.4;
}

.wrapper {
  max-width: 820px;
  margin: auto;
}
.container {
  padding: 1em;
}

.block {
  display: inline-block;
  margin: 1em 10%;
  width: 30%;
  height: 100px;
}

// Modal animation
@keyframes fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}

// Modal styling
.modal {
  background: rgba(225, 239, 202, 0.7);
  display: flex;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: 20;
  opacity: 0;
  
  // Animation trigger  
  animation: fadein 1s;
  animation-delay: 1s;
  animation-fill-mode: forwards;
}
.modal-inner {
  background: rgb(225, 239, 202);
  color: black;
  border: 2px dashed white;
  margin: auto; // Centres the element vertically & horizontally due
  max-width: 320px;
  text-align: center;
  font-size: 16px;
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console