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

              
                Main
  section.container
    header 
      h1.heading-one Quotes
      p.heading-two for
      h1.heading-three Developers
    div
      button.quote.center-block#get-another-quote-button
        br
        i.author - 
              
            
!

CSS

              
                Main{
  padding-top: 50px;
}
button{
  margin-top: 100px;
  border: none;
  background: transparent;
  width: 845px;
  &:focus{
    outline: none;
  }
}
.quote{
  font-family: PlantagenetCherokee;
  font-size: 48px;
  color: #000;
  line-height: 51px;
  text-shadow: 5px 4px 7px rgba(0,0,0,0.50);
}
.quotations{
  padding-top: 100px;
  font-family: Helvetica;
  font-size: 150px;
  color: #02CFF8;
  line-height: 75px;
}
.author{
  opacity: 0.45;
  font-family: Avenir;
  font-size: 60px;
  color: #000;
  letter-spacing: 1.7px;
  line-height: 100px;
  text-shadow: 5px 4px 7px rgba(0,0,0,0.45);
}
.heading-one, .heading-three{
  font-family: Avenir-Book;
  font-size: 75px;
  color: #02CFF8;
  line-height: 94px;
}
.heading-two{
  transform: rotate(-90deg);
  font-family: ArialRoundedMTBold;
  font-size: 75px;
  color: #02CFF8;
  line-height: 84px;
  position: absolute;
}
.heading-three{
  position: absolute;
  left: 250px;
  top: 150px;
}
header{
  padding-bottom: 100px;
}
              
            
!

JS

              
                $(document).ready(function(){
  var button = $('#get-another-quote-button');
  
  function getJSON(){
    $.ajax({
      url: "https://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=44&callback=?",
      method: 'GET',
      mimeType: 'text/javascript',
      headers: {
        'Authorization':'Basic xxxxxxxxxxxxx',
        'Content-Type':'application/json'
    },
      crossDomain: true,
      success: function(data){
        console.log(data);
        // button.text(data.posts[Math.round(Math.random() * 12)]);
      },
    })
  }
  
  getJSON();
  button.click(getJSON);
  
});

              
            
!
999px

Console