Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"/>

<link href="https://fonts.googleapis.com/css?family=Lobster|Open+Sans|Oswald" rel="stylesheet">

<style>
  h1 {
    font-family: Lobster;
    font-size: 75px;
    margin-bottom: -20px;
  }
  h2 {
    font-family: Oswald;
  }
  h3 {
    font-family: Open Sans;
  }
  
  
  .quotebox {
    background-color:  	#d9e6f2;
  margin-right: 300px;
    margin-left:40px;
    padding:50px;
    
  }
  
</style>


<h1> Insta-Quotes </h1>
<h2> Find & Tweet quotes instantly! </h2>
<br>
<br>
<br>
<br>
<br>
<div class='quotebox'>
  <i class="fa fa-quote-left fa-3x fa-pull-left" aria-hidden="true"></i>

<h3 id = 'quotebox'  >
  
</h3>
  <i class="fa fa-quote-right fa-3x fa-pull-right" aria-hidden="true"></i>
  <br> <br>
  
      <div class="col-xs-4">
  <button onClick="showQuotation()" class="btn btn-primary center-block"> <i class="fa fa-refresh" aria-hidden="true"></i>
Get Quote</button>
  </div>
      <div class="col-xs-4">
        <a href ="https://twitter.com/intent/tweet">
  <button class="btn btn-primary center-block"> <i class="fa fa-twitter-square" aria-hidden="true"></i></button> </a>
</div>
</div>
</div>
            
          
!
            
              body{
  background-size: cover;
    background-image: url("https://static.pexels.com/photos/126590/pexels-photo-126590.jpeg");
    background-color: #cccccc;
}

  h1 {
    font-family: Lobster;
    font-size: 75px;
    margin-bottom: -20px;
  }
  h2 {
    font-family: Oswald;
  }
  
  
  .quotebox {
    background-color:  #fff2e6;
  margin-right: 300px;
    margin-left:40px;
    padding:50px;
    
  }
            
          
!
            
              $(document).ready(function(){showQuotation()})

var Quotation=new Array()

Quotation[0] = "Your body is not a temple, it's an amusement park. Enjoy the ride. <br><br> -Anthony Bourdain";
Quotation[1] = "The woods are lovely, dark and deep. But I have promises to keep, and miles to go before I sleep. <br><br> -Robert Frost";
Quotation[2] = "On earth there is no heaven, but there are pieces of it. <br><br> -Jules Renard";
Quotation[3] = "The best way to find yourself is to lose yourself in the service of others. <br><br> -Mahatma Gandhi";
Quotation[4] = "Three things cannot be long hidden: the sun, the moon, and the truth. <br><br> -Buddha";
Quotation[5] = "Life isn't about finding yourself. Life is about creating yourself. <br><br> -George Bernard Shaw";
Quotation[6] = "You can't blame gravity for falling in love. <br><br> -Albert Einstein";
Quotation[7] = "Peace begins with a smile. <br><br> -Mother Teresa";
Quotation[8] = "Yesterday is not ours to recover, but tomorrow is ours to win or lose. <br><br> -Lyndon B. Johnson";
Quotation[9] = "My doctor tells me I should start slowing it down - but there are more old drunks than there are old doctors so let's all have another round. <br><br> -Willie Nelson";
Quotation[10] = "I fart when I'm at peace, and I'm always farting. Or something cool like that. <br><br> -Christopher Wallace";
Quotation[11] = "Ngeeeeee! <br><br> -Garrett Wallace";
Quotation[12] = "Every day you live a day, you die a day. <br><br> -John Wallace Sr.";


var Q = Quotation.length;

function showQuotation(){
  var whichQuotation=Math.round(Math.random()*(Q-1));
  document.getElementById('quotebox').innerHTML=Quotation[whichQuotation];};
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console