cssAudio - ActiveCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

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.

            
              <nav>
  <a href="#">Text</a>
  <a href="#">Link</a>
  <a href="https://dribbble.com/shots/1479745-50-Free-Tessellated-Designs">Header Image</a>
</nav>
<header>
  <h1>I'm the main heading</h1>
</header>
<section>
  <p>This is the content container. And what you are reading is – surprise! – the content text, within that container.</p>
  <p>And there you go, a <a href="https://dribbble.com/shots/147-9745-50-Free-Tessellated-Designs">link</a> to where you can find the header image.</p>
  <p class="bottom"><i class="fa fa-heart"></i></p>
</section>
            
          
!
            
              $teal: #0097a7;
$pink: #ff1744;

@mixin flexbox($direction, $wrap, $justify, $align){
    display: flex;
    flex-direction: $direction;
    flex-wrap: $wrap;
    justify-content: $justify;
    align-items: $align;
}

body{
  font:{
    family: Roboto;
    size: 20px;
    weight: 400;
  }
}

a{
  text-decoration: none;
  transition: .3s all ease;
  color: $pink;
  
  &:hover{
    color: $teal;
  }
}

nav{
  width: 100%;
  background: darken($teal, 5%);
  @include flexbox(row, wrap, space-around, center);
  box-sizing: border-box;
  padding: 0px 15%;
  box-shadow: 0px 0px 10px rgba(black,.5);
  position: fixed;
  z-index: 5;
  
  a{
    padding: 15px 0px;
    color: white;
    
    &:hover{
      color: $pink;
    }
  }
}

header{
  background: {
    image: url(http://4.bp.blogspot.com/-dH5DcqvV4es/VJGqvcHzceI/AAAAAAAAJdU/g-9rc3H1msA/s1600/color2.png);
    attachment: fixed;
  }
  height: 450px;
  position: relative;
  z-index: -1;
  @media screen and (max-width: 631px){
    height: 300px;
  }
  
  h1{
    color: white;
    font-size: 100px;
    text-align: center;
    text-transform: uppercase;
    font-weight: bold;
    text-shadow: 0px 0px 1px black;
    position: fixed;
    top: 150px;
    width: 100%;
    height: auto;
    z-index: -1;
    @media screen and (max-width: 631px){
      font-size: 50px;
    }
  }
}

section{
  min-height: 300vh;
  box-shadow: 0px 0px 5px rgba(black, .5);
  position: relative;
  z-index: 1;
  background: white;
  box-sizing: border-box;
  padding: 20px 15%;
  
  p{
    font-size: 1.2em;
    line-height: 1.5;
  }
  
  .bottom{
    position: absolute;
    bottom: 20px;
    text-align: center;
    width: 100%;
    left: 0;
    color: red;
    font-size: 2em;
  }
}
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console