cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

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.

            
              
<div class="text-center">
  <h1>Random Quote Machine</h1>
<div id="quote"></div>
  <script>
    (function() {
      var quotes = [
        {
          text: "The way to get started is to quit talking and begin doing. <br><em>Walt Disney</em>"
          
        },
        {
          text: "The pessimist sees difficulty in every opportunity. The optimist sees the opportunity in every difficulty. <br><em>Winston Churchill</em>"
        },
        {
          text: "The pessimist sees difficulty in every opportunity. The optimist sees the opportunity in every difficulty. <br><em>Winston Churchill</em>"
        },
        {
          text: "Don’t let yesterday take up too much of today. <br><em>Will Rogers</em>"
        },
        {
          text: "You learn more from failure than from success. Don’t let it stop you. Failure builds character. <br><em>Unknown</em>"
        },
        {
          text: "It’s not whether you get knocked down, it’s whether you get up. <br><em>Vince Lombardi</em>"
        },
        {
          text: "If you are working on something that you really care about, you don’t have to be pushed. The vision pulls you. <br><em>Steve Jobs</em>"
        },
        {
          text: "People who are crazy enough to think they can change the world, are the ones who do. <br><em>Rob Siltanen</em>"
        },
        {
          text: "Failure will never overtake me if my determination to succeed is strong enough. <br><em>Og Mandino</em>"
        },
        {
          text: "Entrepreneurs are great at dealing with uncertainty and also very good at minimizing risk. That’s the classic entrepreneur. <br><em>Mohnish Pabrai</em>"
        }
      ];
      var quote = quotes[Math.floor(Math.random() * quotes.length)];
      document.getElementById("quote").innerHTML =
        '<p>' + quote.text + '</p>';
      // Url Test
      url = "https://twitter.com/home/?status=" + quote.text;
    })();
    //Twitter Button
    twttr.widgets.createShareButton(
  'https://dev.twitter.com/',
  document.getElementById('container'),
  {
    text: 'Hello World'
  }
);
  </script>

</div>
<div class="container">
    <div class="col-md-3">
       <a href="javascript:window.location.replace(url);" class="btn btn-info" role="button"><i class="fa fa-twitter" aria-hidden="true"></i> Tweet this!</a>
        <a href="javascript:location.reload();" class="btn btn-default" role="button"><i class="fa fa-refresh" aria-hidden="true"></i> New Quote!</a>
    </div>
 <h6>&copy; YM 2016 </h6>
</div>

            
          
!
            
              body {
  background-color: #cc0000;
}
h1 {
  color: #FFFFFF;
  font-size: 70px;
  font-family: 'Lobster', cursive;
  padding-top: 70px;
  padding-b
}
p {
  color: #000000;
  font-size: 40px;
}
em {
  color: #666666;
  text-align: right;
}
#quote {
  background-color: #FFFFFF;
}
.col-md-3 {
  background-color: transparent;
}
h6 {
  color: #FFFFFF;
}
            
          
!
999px
Loading ..................

Console