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

              
                <section class="hero uk-background-cover uk-background-norepeat" style="--bg-image-mobile: url(https://assets.codepen.io/162656/bg-hero-mobile.jpg);--bg-image-tablet: url(https://assets.codepen.io/162656/bg-hero-tablet.jpg);--bg-image-desktop: url(https://assets.codepen.io/162656/bg-hero-desk.jpg)">
  <div class="uk-container uk-container-small">
    <div class="uk-background-muted uk-padding">
      <h1>Heading</h1>
      <p class="uk-h3">Vivamus finibus lectus arcu. Nulla at sapien sed nisl tincidunt dictum sed vitae sapien. Aenean egestas lectus sed enim consectetur finibus. In in nunc in ligula cursus luctus. Nulla facilisi.</p>
    </div>
  </div>
</section>
<section class="uk-padding-large">
  <div class="uk-container uk-container-small">
    <h2 class="uk-h1">Another Heading</h2>
    <p class="uk-h4"> Quisque semper ante turpis, sed mollis libero aliquet eu. Mauris eget consectetur neque. Nam id feugiat tellus. Sed tempus lorem porta nulla finibus, id dapibus ligula aliquet. Morbi in gravida nulla. Fusce pharetra dui ligula, eget condimentum urna venenatis vel.</p>
    <p class="uk-h4">Etiam varius sagittis arcu vitae vulputate. Praesent quis nibh sed dolor imperdiet porta. Pellentesque sed est in ante volutpat aliquam quis nec ligula. Donec lorem elit, lobortis at mi a, pellentesque mattis augue.</p>
    <p class="uk-h4">Aenean vulputate purus sit amet odio mattis tincidunt. Praesent ornare est nec lacus dapibus cursus. Vivamus finibus lectus arcu. Nulla at sapien sed nisl tincidunt dictum sed vitae sapien. Aenean egestas lectus sed enim consectetur finibus. In in nunc in ligula cursus luctus. Nulla facilisi.</p>
  </div>
</section>
<footer class="page-footer">
  <span>made by </span>
  <a href="https://georgemartsoukos.com/" target="_blank">
    <img width="24" height="24" src="https://assets.codepen.io/162656/george-martsoukos-small-logo.svg" alt="George Martsoukos logo">
  </a>
</footer>
              
            
!

CSS

              
                body {
  background: #efefef;
}

.uk-background-muted {
  background: rgba(248, 248, 248, 0.75);
  backdrop-filter: blur(10px);
}

.hero {
  padding: 20vh 0;
  background-image: var(--bg-image-mobile);
}

@media (min-width: 960px) {
  .hero {
    background-image: var(--bg-image-tablet);
  }
}

@media (min-width: 1200px) {
  .hero {
    background-image: var(--bg-image-desktop);
  }
}

/* FOOTER STYLES
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.page-footer {
  position: fixed;
  right: 0;
  bottom: 50px;
  display: flex;
  align-items: center;
  padding: 5px;
  background: #fff;
}

.page-footer a {
  display: flex;
  margin-left: 4px;
}

              
            
!

JS

              
                
              
            
!
999px

Console