octocatstartv

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
via CSS Lint

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
via JS Hint

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Want a Run Button?

If active, the preview will update automatically when you change code.

HTML

            
              <div class="main-title test1">
  <h1>Lorem Ipsum</h1>
</div>

<div class="main-title test2">
  <h1>Lorem ipsum</h1>
</div>

<div class="main-title test3">
  <h1>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis nec urna lobortis nibh gravida venenatis. Maecenas a hendrerit nibh.</h1>
</div>

<div class="main-title test4">
  <h1>Lorem ipsum</h1>
</div>
            
          
!

CSS

            
              @import "compass/css3";

.main-title{
  width: 60%;
  padding: 0 2em;
  margin: 2em auto;
  text-align: center;
  position: relative;
  
  &:before{
    @include transform(skew(-15deg));
    content: '';
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    background: orange;
    z-index: -10;
  }
  
  > h1{
    display: inline-block;
    position: relative;
    margin: 0;
    padding: 0 2em;
    
    &:before{
      @include transform(skew(-15deg));
      content: '';
      width: 100%;
      height: 100%;
      top: 0;
      left: 0;
      position: absolute;
      background: #FFFFFF;
      z-index: -5;
    }
  }
}



/* --- DIFFERENT STYLES --- */



.test2:before{
  @include transform(skew(15deg));
  background: #454545;
}
  
.test2 > h1:before{
  @include transform(skew(15deg));
}

.test3:before{
  background-color: #1e5799;
  @include filter-gradient(#1e5799, #7db9e8, horizontal);
  @include background-image(radial-gradient(center, ellipse cover,  #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%));
}

.test4:before{
  background-color: #FFFFFF;
  @include filter-gradient(#FFFFFF, #454545, vertical);
  @include background-image(linear-gradient(top,  #FFFFFF 0%,#FFFFFF 45%,#454545 45%,#454545 55%,#FFFFFF 55%,#FFFFFF 100%));
}
            
          
!

JS

            
              
            
          
!
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