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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <div class="container">
  <blockquote class="quote-card">
    <p>
      Scratch a dog and you'll find a permanent job. 
    </p>

    <cite>
      Franklin P. Jones
    </cite>
  </blockquote>

  <blockquote class="quote-card blue-card">
    <p>
      Our greatest glory is not in never falling, but in rising every time we fall.
    </p>

    <cite>
      Confucius
    </cite>
  </blockquote>

  <blockquote class="quote-card red-card">
    <p>
      A creative man is motivated by the desire to achieve, not by the desire to beat others.
    </p>

    <cite>
      Ayn Rand
    </cite>
  </blockquote>

  <blockquote class="quote-card yellow-card">
    <p>
      Life is one big road with lots of signs. So when you riding through the ruts, don't complicate your mind. Flee from hate, mischief and jealousy. Don't bury your thoughts, put your vision to reality. Wake Up and Live!
    </p>

    <cite>
      Bob Marley
    </cite>
  </blockquote>

  <p class="text-center credits">
    <a target="_blank" href="https://twitter.com/bharani91">
      bharanim
    </a>
  </p>
</div>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,200italic);


$background: #eee;
$black: #222222;
$white: #ffffff;

$default: #fff;
$defaultTextColor: #222222;
$defaultSecondaryTextColor: #eee;


$red: #D32F2F;
$redTextColor: $white;
$redSecondaryTextColor: #F44336;

$blue: #303F9F;
$blueTextColor: $white;
$blueSecondaryTextColor: #3F51B5;

$yellow: #F9A825;
$yellowTextColor: $black;
$yellowSecondaryTextColor: #FBC02D;


body {
  background: $background;
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 300;
}

.container {
  max-width: 800px;
  margin: 80px auto;
}
.text-center {
  text-align: center;
}

.quote-card {
  background: $default;
  color: $defaultTextColor;
  
  padding: 20px;
  padding-left: 50px;
  box-sizing: border-box;
  box-shadow: 0 2px 4px rgba($black, 0.12);
  
  position: relative;
  overflow: hidden;
  min-height: 120px;
  
  p {
    font-size: 22px;
    line-height: 1.5;
    margin: 0;
    max-width: 80%;
  }
  
  cite {
    font-size: 16px;
    margin-top: 10px;
    display: block;
    font-weight: 200;
    opacity: 0.8;
  }
  
  &:before {
    font-family: Georgia, serif;
    content: "“";
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 5em;
    color: rgba($defaultSecondaryTextColor, 0.8);
    font-weight: normal;
  }
  
  &:after {
    font-family: Georgia, serif;
    content: "”";
    position: absolute;
    bottom: -110px;
    line-height: 100px;
    right: -32px;
    font-size: 25em;
    color: rgba($defaultSecondaryTextColor, 0.8);
    font-weight: normal;
  }
  
  @media(max-width: 640px) {
    &:after {
      font-size: 22em;
      right: -25px;
    }
  }
  
  
  &.blue-card {
    background: $blue;
    color: $blueTextColor;
    box-shadow: 0 1px 2px rgba($black, 0.12), 0 2px 4px rgba($black, 0.24);
    
    &:before, &:after {
      color: $blueSecondaryTextColor;
    }
  }
  
  &.red-card {
    background: $red;
    color: $redTextColor;
    box-shadow: 0 1px 2px rgba($black, 0.12), 0 2px 4px rgba($black, 0.24);
    
    &:before, &:after {
      color: $redSecondaryTextColor;
    }
  }
  
  &.yellow-card {
    background: $yellow;
    color: $yellowTextColor;
    box-shadow: 0 1px 2px rgba($black, 0.12), 0 2px 4px rgba($black, 0.24);
    
    &:before, &:after {
      color: $yellowSecondaryTextColor;
    }
  }
}


.credits {
  margin-top: 80px;
  a {
    color: $black;
    text-decoration: none;
    text-shadow: 0 0 2px rgba($black, 0.24);
    padding-bottom: 1px;
    display: inline-block;
    border-bottom: 1px dashed rgba($black, 0.24);
    opacity: 0.6;
    
    transition: 0.3s all ease-in;
    
    
    &:hover {
      border-bottom-style: solid;
      opacity: 1;
    }
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console