Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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="fluid fix-color">
  <div class="jumbotron fix-margins">
    <div class="jumbotron space">
      <h1 class="text-left">"</h1>
      <div class="row">
        <div class="col-sm-12 text-center quote-style quote">
        </div>
      </div>
      <h1 class="text-right more-margin-top">"</h1>
      <div class="row">
        <div class="col-sm-12 text-right quote-author-style quote-author">
        </div>
      </div>
    </div>
    <div class="row">
      <div class="col-sm-4" align="center">
        <a class="btn btn-primary button-color button-color:hover button-color:hover" target="_blank"><i class="fa fa-twitter match-size"></i></a>
      </div>
      <div class="col-sm-4">
      </div>
      <div class="col-sm-4" align="center">
        <button class="btn btn-primary button-color match-size" id="newQuote">New Quote</button>
      </div>
    </div>
  </div>
  <h6 align="center"><em>Created by</em> <strong>Michael Kerl</strong></h6>
</div>
              
            
!

CSS

              
                html {
  transition-duration: 1s;
  background-color: black;
}

body {
  color: white;
}

h1 {
  transition-duration: 1s;
  font-family: 	Zapfino;
  font-size: 40px;
  color: black;
}

.fix-color {
  transition-duration: 1s;
  background-color: black;
}

.fix-margins {
  margin-top: 10%;
  margin-right: 20%;
  margin-left: 20%;
}

.space {
  background-color: white;
  margin-right: 5%;
  margin-bottom: 5%;
  margin-left: 5%;
}

.match-size {
  font-size: 20px;
}

.quote-style {
  transition-duration: 1s;
  font-family: Arial Black;
  color: black;
  font-size: 35px;
}

.quote-author-style {
  transition-duration: 1s;
  margin-top: 3%;
  font-family: Arial Black;
  color: black;
  font-size: 25px;
}

.button-color {
  transition-duration: 1s;
  background-color: black;
  border: none;
}

.button-color:hover {
  transition-duration: 0.3s;
  background-color: grey !important;
  border: none;
}

.quote {
  transition-duration: 1s;
}

.more-margin-top {
  margin-top: 5%;
}
              
            
!

JS

              
                $(document).ready(function() {
  function getColor() {
    var letters = "0123456789ABCDEF";
    var color = "#";
    for (var i = 0; i < 6; i++) {
      color += letters[Math.floor(Math.random() * 16)];
    }
    return color;
  }

  var currentColor = getColor();

  $("html").css("background-color", currentColor);
  $(".fix-color").css("background-color", currentColor);
  $(".quote-style").css("color", currentColor);
  $(".quote-author-style").css("color", currentColor);
  $("h1").css("color", currentColor);
  $(".button-color").css("background-color", currentColor);

  function rand() {
    return Math.floor(Math.random() * quoteArr.length);
  }

  var randNum = rand();

  function getQuote() {
    return quoteArr[randNum][0];
  }

  function getQuoteAuthor() {
    return quoteArr[randNum][1];
  }

  $(".quote").html(getQuote());
  $(".quote-author").html("- " + getQuoteAuthor());
  document.getElementsByTagName("a")[0].setAttribute("href", "https://twitter.com/intent/tweet?text=" + encodeURIComponent(getQuote()) + " -" + getQuoteAuthor());

  $("#newQuote").on("click", function() {
    randNum = rand();
    $(".quote").html(getQuote());
    $(".quote-author").html("- " + getQuoteAuthor());
    document.getElementsByTagName("a")[0].setAttribute("href", "https://twitter.com/intent/tweet?text=" + encodeURIComponent(getQuote()) + " -" + getQuoteAuthor());

    var currentColor = getColor();

    $("html").css("background-color", currentColor);
    $(".fix-color").css("background-color", currentColor);
    $(".quote-style").css("color", currentColor);
    $(".quote-author-style").css("color", currentColor);
    $(".button-color").css("background-color", currentColor);
    $("h1").css("color", currentColor);
  });
});

var quoteArr = [
  [
    "Life isn’t about getting and having, it’s about giving and being.",
    "Kevin Kruse"
  ],
  [
    "Whatever the mind of man can conceive and believe, it can achieve.",
    "Napoleon Hill"
  ],
  ["Strive not to be a success, but rather to be of value.", "Albert Einstein"],
  [
    "Two roads diverged in a wood, and I—I took the one less traveled by, And that has made all the difference.",
    "Robert Frost"
  ],
  [
    "I attribute my success to this: I never gave or took any excuse.",
    "Florence Nightingale"
  ],
  ["You miss 100% of the shots you don’t take.", "Wayne Gretzky"],
  [
    "I’ve missed more than 9000 shots in my career. I’ve lost almost 300 games. 26 times I’ve been trusted to take the game winning shot and missed. I’ve failed over and over and over again in my life. And that is why I succeed.",
    "Michael Jordan"
  ],
  [
    "The most difficult thing is the decision to act, the rest is merely tenacity.",
    "Amelia Earhart"
  ],
  ["Every strike brings me closer to the next home run.", "Babe Ruth"],
  [
    "Definiteness of purpose is the starting point of all achievement.",
    "W. Clement Stone"
  ],
  [
    "We must balance conspicuous consumption with conscious capitalism.",
    "Kevin Kruse"
  ],
  [
    "Life is what happens to you while you’re busy making other plans.",
    "John Lennon"
  ],
  ["We become what we think about.", "Earl Nightingale"],
  [
    "Twenty years from now you will be more disappointed by the things that you didn’t do than by the ones you did do, so throw off the bowlines, sail away from safe harbor, catch the trade winds in your sails.  Explore, Dream, Discover.",
    "Mark Twain"
  ],
  [
    "Life is 10% what happens to me and 90% of how I react to it.",
    "Charles Swindoll"
  ],
  [
    "The most common way people give up their power is by thinking they don’t have any.",
    "Alice Walker"
  ],
  ["The mind is everything. What you think you become.", "Buddha"],
  [
    "The best time to plant a tree was 20 years ago. The second best time is now.",
    "Chinese Proverb"
  ],
  ["An unexamined life is not worth living.", "Socrates"],
  ["Eighty percent of success is showing up.", "Woody Allen"],
  [
    "Your time is limited, so don’t waste it living someone else’s life.",
    "Steve Jobs"
  ],
  ["Winning isn’t everything, but wanting to win is.", "Vince Lombardi"],
  [
    "I am not a product of my circumstances. I am a product of my decisions.",
    "Stephen Covey"
  ],
  [
    "Every child is an artist.  The problem is how to remain an artist once he grows up.",
    "Pablo Picasso"
  ],
  [
    "You can never cross the ocean until you have the courage to lose sight of the shore.",
    "Christopher Columbus"
  ],
  [
    "I’ve learned that people will forget what you said, people will forget what you did, but people will never forget how you made them feel.",
    "Maya Angelou"
  ],
  ["Either you run the day, or the day runs you.", "Jim Rohn"][
    ("Whether you think you can or you think you can’t, you’re right.", "Henry Ford")
  ],
  [
    "The two most important days in your life are the day you are born and the day you find out why.",
    "Mark Twain"
  ][
    ("Whatever you can do, or dream you can, begin it.  Boldness has genius, power and magic in it.", "Johann Wolfgang von Goethe")
  ],
  ["The best revenge is massive success.", "Frank Sinatra"][
    ("People often say that motivation doesn’t last. Well, neither does bathing.  That’s why we recommend it daily.", "Zig Ziglar")
  ],
  ["Life shrinks or expands in proportion to one’s courage.", "Anais Nin"],
  [
    "If you hear a voice within you say “you cannot paint,” then by all means paint and that voice will be silenced.",
    "Vincent Van Gogh"
  ],
  [
    "There is only one way to avoid criticism: do nothing, say nothing, and be nothing.",
    "Aristotle"
  ],
  [
    "Ask and it will be given to you; search, and you will find; knock and the door will be opened for you.",
    "Jesus"
  ],
  [
    "The only person you are destined to become is the person you decide to be.",
    "Ralph Waldo Emerson"
  ],
  [
    "Go confidently in the direction of your dreams.  Live the life you have imagined.",
    "Henry David Thoreau"
  ],
  [
    "When I stand before God at the end of my life, I would hope that I would not have a single bit of talent left and could say, I used everything you gave me.",
    "Erma Bombeck"
  ],
  [
    "Few things can help an individual more than to place responsibility on him, and to let him know that you trust him.",
    "Booker T. Washington"
  ],
  [
    "Certain things catch your eye, but pursue only those that capture the heart.",
    " Ancient Indian Proverb"
  ],
  ["Believe you can and you’re halfway there.", "Theodore Roosevelt"],
  [
    "Everything you’ve ever wanted is on the other side of fear.",
    "George Addair"
  ],
  [
    "We can easily forgive a child who is afraid of the dark; the real tragedy of life is when men are afraid of the light.",
    "Plato"
  ],
  [
    "Teach thy tongue to say, “I do not know,” and thous shalt progress.",
    "Maimonides"
  ],
  ["Start where you are. Use what you have.  Do what you can.", "Arthur Ashe"],
  [
    "When I was 5 years old, my mother always told me that happiness was the key to life.  When I went to school, they asked me what I wanted to be when I grew up.  I wrote down ‘happy’.  They told me I didn’t understand the assignment, and I told them they didn’t understand life.",
    "John Lennon"
  ],
  ["Fall seven times and stand up eight.", "Japanese Proverb"],
  [
    "When one door of happiness closes, another opens, but often we look so long at the closed door that we do not see the one that has been opened for us.",
    "Helen Keller"
  ],
  ["Everything has beauty, but not everyone can see.", "Confucius"],
  [
    "How wonderful it is that nobody need wait a single moment before starting to improve the world.",
    "Anne Frank"
  ][("When I let go of what I am, I become what I might be.", "Lao Tzu")],
  [
    "Life is not measured by the number of breaths we take, but by the moments that take our breath away.",
    "Maya Angelou"
  ],
  [
    "Happiness is not something readymade.  It comes from your own actions.",
    "Dalai Lama"
  ],
  [
    "If you’re offered a seat on a rocket ship, don’t ask what seat! Just get on.",
    "Sheryl Sandberg"
  ],
  [
    "First, have a definite, clear practical ideal; a goal, an objective. Second, have the necessary means to achieve your ends; wisdom, money, materials, and methods. Third, adjust all your means to that end.",
    "Aristotle"
  ],
  ["If the wind will not serve, take to the oars.", "Latin Proverb"],
  [
    "You can’t fall if you don’t climb.  But there’s no joy in living your whole life on the ground.",
    "Unknown"
  ],
  [
    "We must believe that we are gifted for something, and that this thing, at whatever cost, must be attained.",
    "Marie Curie"
  ],
  [
    "Too many of us are not living our dreams because we are living our fears.",
    "Les Brown"
  ],
  [
    "Challenges are what make life interesting and overcoming them is what makes life meaningful.",
    "Joshua J. Marine"
  ],
  [
    "If you want to lift yourself up, lift up someone else.",
    "Booker T. Washington"
  ],
  [
    "I have been impressed with the urgency of doing. Knowing is not enough; we must apply. Being willing is not enough; we must do.",
    "Leonardo da Vinci"
  ],
  [
    "Limitations live only in our minds.  But if we use our imaginations, our possibilities become limitless.",
    "Jamie Paolinetti"
  ],
  [
    "You take your life in your own hands, and what happens? A terrible thing, no one to blame.",
    "Erica Jong"
  ],
  [
    "What’s money? A man is a success if he gets up in the morning and goes to bed at night and in between does what he wants to do.",
    "Bob Dylan"
  ],
  [
    "I didn’t fail the test. I just found 100 ways to do it wrong.",
    "Benjamin Franklin"
  ],
  [
    "In order to succeed, your desire for success should be greater than your fear of failure.",
    "Bill Cosby"
  ],
  [
    "A person who never made a mistake never tried anything new.",
    " Albert Einstein"
  ],
  [
    "The person who says it cannot be done should not interrupt the person who is doing it.",
    "Chinese Proverb"
  ],
  ["There are no traffic jams along the extra mile.", "Roger Staubach"],
  ["It is never too late to be what you might have been.", "George Eliot"],
  ["You become what you believe.", "Oprah Winfrey"],
  ["I would rather die of passion than of boredom.", "Vincent van Gogh"],
  [
    "A truly rich man is one whose children run into his arms when his hands are empty.",
    "Unknown"
  ],
  [
    "It is not what you do for your children, but what you have taught them to do for themselves, that will make them successful human beings.",
    "Ann Landers"
  ],
  [
    "If you want your children to turn out well, spend twice as much time with them, and half as much money.",
    "Abigail Van Buren"
  ],
  [
    "Build your own dreams, or someone else will hire you to build theirs.",
    "Farrah Gray"
  ],
  [
    "The battles that count aren’t the ones for gold medals. The struggles within yourself–the invisible battles inside all of us–that’s where it’s at.",
    "Jesse Owens"
  ],
  ["Education costs money.  But then so does ignorance.", "Sir Claus Moser"],
  [
    "I have learned over the years that when one’s mind is made up, this diminishes fear.",
    "Rosa Parks"
  ],
  [
    "It does not matter how slowly you go as long as you do not stop.",
    "Confucius"
  ],
  [
    "If you look at what you have in life, you’ll always have more. If you look at what you don’t have in life, you’ll never have enough.",
    "Oprah Winfrey"
  ],
  [
    "Remember that not getting what you want is sometimes a wonderful stroke of luck.",
    "Dalai Lama"
  ],
  [
    "You can’t use up creativity.  The more you use, the more you have.",
    "Maya Angelou"
  ],
  ["Dream big and dare to fail.", "Norman Vaughan"],
  [
    "Our lives begin to end the day we become silent about things that matter.",
    "Martin Luther King Jr."
  ],
  ["Do what you can, where you are, with what you have.", "Teddy Roosevelt"],
  [
    "If you do what you’ve always done, you’ll get what you’ve always gotten.",
    "Tony Robbins"
  ],
  ["Dreaming, after all, is a form of planning.", "Gloria Steinem"],
  [
    "It’s your place in the world; it’s your life. Go on and do all you can with it, and make it the life you want to live.",
    "Mae Jemison"
  ],
  [
    "You may be disappointed if you fail, but you are doomed if you don’t try.",
    "Beverly Sills"
  ],
  [
    "Remember no one can make you feel inferior without your consent.",
    "Eleanor Roosevelt"
  ],
  [
    "Life is what we make it, always has been, always will be.",
    "Grandma Moses"
  ],
  [
    "The question isn’t who is going to let me; it’s who is going to stop me.",
    "Ayn Rand"
  ],
  [
    "When everything seems to be going against you, remember that the airplane takes off against the wind, not with it.",
    "Henry Ford"
  ],
  [
    "It’s not the years in your life that count. It’s the life in your years.",
    "Abraham Lincoln"
  ],
  ["Change your thoughts and you change your world.", "Norman Vincent Peale"],
  [
    "Either write something worth reading or do something worth writing.",
    "Benjamin Franklin"
  ],
  [
    "Nothing is impossible, the word itself says, “I’m possible!”",
    "–Audrey Hepburn"
  ],
  ["The only way to do great work is to love what you do.", "Steve Jobs"],
  ["If you can dream it, you can achieve it.", "Zig Ziglar"]
];

              
            
!
999px

Console