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


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


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 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.


                <div class="content">

    <div class="wordHolder">
      <p class="quote">
        Lorem ipsum dolor sit met, consectetur adipiscing elit. Quisque a est
        nec nulla bandiet lacinia et sollecitudine eros. Sed eu mi enim. Nam
        faucibus pharetra sappen, sed fermentum locus tincidunt vel. Prooien
        id ex visus.
      <p class="author">-Everyone</p>
      <p class="twitter"><button class="white"><a href="#" class="tweet" target=”_blank”><i class="fa fa-twitter" aria-hidden="true"></i> Tweet This</a></button>
      <button id="newQuote" class="white">Show me another!</button></p>

    </div><!-- /.wordHolder -->
    <div class="styles">
      <h3>Page Options:</h3>

        <li>Background color: <br />
        <button id="blackWhite" class="white">White</button>
        <li>Fun color: <br />
          <button id="changeColor" class="white">Random</button>
    </div><!-- /.styles" -->

  </div><!-- /.content -->



                .twitter {
  text-align: center;
.twitter a {
  text-decoration: none;

.content {
  width: 50vw;
  margin: 10% auto;
  padding: 20px;
  border-radius: 15px;
  background: black; }

.quote {
  border: 5px solid;
  border-radius: 15px;
  padding: 20px; }

.styles {
  margin: 20px 0; }

.content {
  color: white;
  font-size: 24px; }

.quote {
  text-align: justify; }
.author {
  text-align: right; 

h2, h3 {
  text-align: center; }

button {
  font-size: 18px; }

.styles ul li button {
  display: block;
  margin: 5px auto; }

button {
  border-radius: 10px; 
padding: 10px; }

  button#newQuote {
    display: inline-block;
    margin-left: 25px;
  button.white {
    background: white;
    color: black; } {
    background: black;
    color: white; }

/* Other Styles */
ul {
  display: block;
  text-align: center; }
  ul li {
    display: inline-block;
    border: 2px solid;
    padding: 5px; }



                // Do this right away!

// Getting Quotes:
function getQuote() {  
    url: "[orderby]=rand&filter[posts_per_page]=1&callback=?",
    success: function(data){
      $('.author').html("- " + data[0].title);
    cache: false

// Functions for changing colors of different elements
function color() {
	return Math.floor(Math.random() * 256);

function rgb_color() {
	var rgbString = 'rgb(';
	rgbString += color() + ', ';
	rgbString += color() + ', ';
	rgbString += color() + ')';
	return rgbString;

function clickColor() {
  rgb = rgb_color();
  $('.content').css('color', rgb);
  $('body').css('background', rgb);
  $('button').css('color', rgb);
  $('.tweet').css('color', rgb);

function changeBW(color){
  $('.content').css('background', color);

// Twitter click to tweet thing 
function twitterLink() {
  var link = "";
  var quote = $('.quote').text();
  if (quote.length > 140) {
    quote = quote.slice(0, 130);
    link += quote + "...";
  } else {
    link += quote;
  $('.tweet').attr("href", link);

// Click Button Events
$('#newQuote').on('click', function() {

$('#changeColor').on('click', function() {

$('#blackWhite').on('click', function() {
  if ($('#blackWhite').hasClass('white')) {
  } else {