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. 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

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

              
                <script type="text/javascript" src="//use.typekit.net/xsa3cbo.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>

<article class="article">
  <header style="background-image: url(https://s3.amazonaws.com/ooomf-com-files/dMQHVOrkSGiAQe516cFD_sylwiabartyzel_unsplash_tatry_02.jpg);">
    <div class="title">
      <h1>Lorem ipsum dolor sit amet nemo culpa</h1>
      <span class="sub-head">Voluptas tenetur dolorum</span>
    </div>
    <figure>
      <img src="https://s3.amazonaws.com/ooomf-com-files/kVEPcWcfSA2tgOpRz9Za__DSC0765.jpg" alt="" />
    </figure>
  </header>
  <div class="article-content">
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tempora quis praesentium eos excepturi in pariatur mollitia eaque ratione fuga laborum eveniet reprehenderit iusto doloribus molestias velit nemo culpa. Doloremque possimus.</p>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Architecto ad laborum ipsum incidunt earum alias ea voluptatem consequuntur cum quia dolor esse. Sunt quod error incidunt quisquam tempore corporis animi?</p>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cumque officia dolores quam pariatur veritatis beatae sequi consequuntur dolore quibusdam itaque quisquam a sapiente soluta deleniti mollitia assumenda vitae quas reiciendis?</p>
  </div>
</article>
              
            
!

CSS

              
                @import "compass/css3";

$primary: #292c2f;
$textPrimary: #e3e6ec;

* {
  box-sizing: border-box;
}

img,
figure{
  margin: 0;
  padding: 0;
  max-width: 100%;
}

body {
  color: $textPrimary;
  background-color: $primary;
  -webkit-font-smoothing: antialiased;
  font-family: "garamond-premier-pro-display",serif;
  font-style: normal;
  font-weight: 400;
  font-size: 1.6em;
  line-height: 1.4;
  padding: 15px;
  
  @media screen and (max-width: 1000px) {
    font-size: 1.4em;
  }
}

.article {
  border: 1px solid rgba(255,255,255,0.5);
  
  figure {
    img {
      visibility: hidden;
    }
  }
  header {
    position: relative;
    background-size: cover;
    background-position: center;
    max-height: 800px;
    width: calc(100% + 30px);
    margin-left: -15px;
    z-index: -1;
    margin-top: -15px;
    
    &:before {
      content: '';
      position: absolute;
      z-index: 1;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: $primary;
      opacity: 0.35;
    }
    &:after {
      content: '';
      position: absolute;
      z-index: 1;
      bottom: 0;
      left: 0;
      right: 0;
      height: 80%;
      @include background-image(linear-gradient(bottom, $primary 0%, $primary 20%, rgba(41,44,47,0) 100%));
    }
  }
  .title {
    color: white;
    position: absolute;
    z-index:2;
    margin: 0;
    width: 100%;
    top: 40%;
    text-align: center;
    
    @media screen and (max-width: 650px) {
      top: 25%;
    }
    
  }
  h1 {
    font-family: "chaparral-pro",sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 2.4em;
    font-variant: small-caps;
    letter-spacing: 1px;
    margin: 0 0 0.2em 0;
    padding: 0 1em;
    line-height: 1;
    
    @media screen and (min-width: 651px) and (max-width: 850px) {
      font-size: 2em;
    }
    @media screen and (max-width: 650px) {
      font-size: 1.8em;
    }
  }
  .sub-head {
    font-family: "chaparral-pro",sans-serif;
    font-style: italic;
    font-weight: 300;
    color: white;
    padding-top: 0.3em;
    position: relative;
    opacity: 0.7;
    
    &:before {
      content: '';
      position: absolute;
      top: 0;
      left: 50%;
      width: 60px;
      height: 1px;
      background: white;
      margin-left: -30px;
    }
  }
}
.article-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
  width: 65%;
  margin: -5em auto 5em auto;
  
  @media screen and (max-width: 650px) {
    width: 80%;
    max-width: auto;
    margin-top: -3em;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console