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

              
                <main>
  <div class="hero-wrapper">
    <picture>
      <source media="(min-width: 450px) and (max-width: 749px) and (orientation: landscape)" srcset="https://s3-us-west-2.amazonaws.com/s.cdpn.io/36489/workspace-hero-landscape.svg" type="image/svg+xml">
      <source media="(max-width: 750px)" srcset="https://s3-us-west-2.amazonaws.com/s.cdpn.io/36489/workspace-hero-small.svg" type="image/svg+xml">
      <source srcset="https://s3-us-west-2.amazonaws.com/s.cdpn.io/36489/workspace-hero.svg" type="image/svg+xml">
      <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/36489/workspace-hero.png" alt="Sheelah Brennan - web design and development">
    </picture>
  </div>
  <div class="tagline"><h1>Tagline Here</h1></div>
  <div class="content__about">
    <section>
      <h2>Who We Are</h2>
      <p>Leo ut praesent leo per a ornare sem ornare venenatis elementum parturient potenti ligula risus ligula platea mattis habitasse suspendisse feugiat odio. Nisi eleifend adipiscing non cum ut nec etiam placerat litora pretium sodales est fames dapibus euismod adipiscing cubilia.</p>
      </p>Ad ac blandit blandit per adipiscing lobortis nascetur mi accumsan enim condimentum imperdiet metus ullamcorper class vestibulum mus malesuada parturient habitasse eu convallis parturient elementum dis.</p>
  <p>Primis ullamcorper a id adipiscing pharetra convallis tristique lectus nec scelerisque vestibulum pulvinar ac ut a condimentum ultricies. Vestibulum malesuada quam nostra duis turpis sagittis curabitur augue a a a in fusce ullamcorper adipiscing a penatibus ultrices
    mattis a sem nam condimentum viverra ullamcorper.</p><p>Dolor donec cras massa dui a interdum est consequat ullamcorper vestibulum vestibulum curabitur ligula velit blandit dictumst imperdiet per ridiculus id. Senectus fringilla integer dolor scelerisque faucibus suspendisse vestibulum ad lacus consectetur diam eleifend molestie fames viverra laoreet.</p><p>Ligula imperdiet gravida vehicula conubia ornare ridiculus litora metus adipiscing in velit per placerat fames quam eleifend suspendisse semper
  vestibulum placerat cum eleifend condimentum volutpat nam laoreet posuere.</p><p>Erat vestibulum leo ultricies sagittis a congue nascetur elit nec erat ad risus mus dolor eget a gravida penatibus ut habitasse vestibulum dis vehicula quam facilisi imperdiet
  potenti ad.</p> Laoreet erat ultricies gravida curae a donec ac ad a tempus suspendisse sem primis vestibulum felis vestibulum adipiscing massa parturient parturient vivamus adipiscing adipiscing a justo orci parturient. Dapibus ridiculus dapibus mentum taciti consectetur primis ut orci a leo consectetur.</p>
  </div>
</main>
              
            
!

CSS

              
                body {
  height: 100%;
  margin: 0;
}

main {
  max-width: 100%;
  overflow: hidden;
  position: relative;
}

.hero-wrapper {
  // Note: using padding-bottom hack on this container.
  // See: https://css-tricks.com/scale-svg/
  box-sizing: content-box;
  position: relative;
  height: 0%;
  width: 100%;
  top: 0;
  left: 0;
  z-index: -100;
  background: rgba(61, 80, 102, 0.78);
  padding: 0;
  padding-bottom: 86%; // aspect ratio for smaller SVG
  @media only screen and (min-width: 28.125em) and (max-width: 46.875em) and (orientation: landscape) {
    padding-bottom: 50%;
  }
  @media only screen and (min-width: 46.875em) {
    padding-bottom: 53%;
  }
  picture {
    height: 100%;
    width: 100%;
  }
}

.content__about {
  padding: 4em 2em;
  background-color: #fff;
  margin: 0 auto;
  position: relative;
  z-index: 10;
  top: 0;
  width: 100%;
  height: 100%;
  section {
    max-width: 60%;
    margin: 0 auto;
  }
}

.tagline {
  position: absolute;
  top: 3%;
  left: 15%;
  z-index: 20;
  h1 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-shadow: 0 0 10px #999;
  }
  @media only screen and (min-width: 20.5em) {
    h1 {
      font-size: 24px;
    }
  }
  @media only screen and (min-width: 30em) {
    left: 20%;
  }
  @media only screen and (min-width: 32.5em) {
    h1 {
      font-size: 32px;
    }
  }
  @media only screen and (min-width: 40em) {
    top: 4%;
  }
  @media only screen and (min-width: 46.875em) {
    top: 2.5%;
    left: 15%;
    max-width: 60%;
  }
  @media only screen and (min-width: 48em) {
    top: 4.5%;
    h1 {
      font-size: 38px;
    }
  }
  @media only screen and (min-width: 64em) {
    top: 6%;
    max-width: 55%;
    h1 {
      font-size: 42px;
    }
  }
  @media only screen and (min-width: 75em) {
    max-width: 50%;
    h1 {
      font-size: 48px;
    }
  }
  @media only screen and (min-width: 87.5em) {
    top: 7%;
    left: 18%;
    h1 {
      font-size: 60px;
    }
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console