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

              
                 <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" />
    <link href="//netdna.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet">
    <script src="//netdna.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>


 <div class="container">
        <div class="row">
            <h1 class="text-center" id="quote"></h1>
            <br />
            <h4 id="quoteWritter" class="text-right"></h4>
        </div>
        <div class="row pull-right">
            <a id="tweetQuote" href="" target="_blank" class="btn btn-primary " title="Tweet this" data-toggle="tooltip" style="visibility:visible">
                <i class="fa fa-twitter"></i>
            </a>
            <input type="button" class="btn btn-primary " title="Generate New Quote" value="Generate New Quote" onclick="generateNewQuote()" />
        </div>


    </div>
              
            
!

CSS

              
                .contentStyle{
    position:fixed;
    left: 25%;
    /*top: 30%;*/
    height:auto;
    width:50%;
    /*border:3px solid gray;*/
    text-align:center;
    vertical-align:central;
    padding-left:30px;
    padding-right:30px;
    padding-bottom:10px;
    border-radius:25px;
}

#quote{
    font-family: "Tangerine";
	font-size: 400%;
    color: white;
}

#quoteWritter{
    font-family: "Tangerine";
	font-size: 250%;
    color: white;
}

body{
    /*background-image:url("https://thumbs.dreamstime.com/z/yellow-dandelion-background-5383963.jpg");*/
    background-size:100%;
    background-repeat:no-repeat;
}

              
            
!

JS

              
                 var count = 0;

        var quotesArray = [["Everyone is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid.", "Albert Einstein"],
            ["Live as if you were to die tomorrow. Learn as if you were to live forever.", "Mahatma Gandhi"],
            ["In the practice of tolerence, one's enemy is the best teacher.", "The Dalai Lama"],
            ["People will forget what you said... they will forget what you did but the will NEVER FORGET how you made them FEEL.", "Maya Angelou"],
            ["If you can't fly, then run, if you cant run, then walk, if you cant walk, then crawl, but whatever you do, you have to keep moving forward.", "Martin Luther King Jr."],
            ["Have a courage to follow your heart and intution. They somehow know what you truly want to become.", "Steve Jobs"],
            ["Win as if you were used to it, lose as if you enjoyed it for a change.", "Ralph Waldo Emerson"],
            ["Strength does not come from winning. your struggle develope your strengths. When you go through hardshipls and decide not to surrender, that is strength.", "Mahatma Gandhi"],
            ["If today were the last day of your life, would you want to do what you are about to do today?", "Steve Jobs"],
            ["The future belongs to those who prepre for it today.", "Malcolm X"],
            ["Two things are infinite. The universe and human stupidity....and i'm not so sure about the universe.", "Albert Einstein"],
            ["Efforts and courage are not enough without purpose and direction.", "JFK"],
            ["If you judge the characher you cant play it.", "Alan Rickman"],
            ["Everything happens for a reason. Maybe you don't see the reason right now, but when it is finally revealed..it will blow you away.", ""],
            ["Sucess is a lousy teacher. it seduces smart people into thinking they can't lose.", "Bill Gates"],
            ["Whatever you are, be a good one.", "Abraham Lincoln"],
            ["Kind words are short and easy to speak, but their echoes are truly endless.", "Mother Terresa"],
            ["I have many problems in my life. But my lips dont know that. They always smile.", "Charlie Chaplin"],
            ["We did not come to fear the future. We came here to sharpe it.", "Barack Obama"],
            ["Dont save what is left after Spending, But spend what is left after Saving.", "Warren Buffett"]]

        var imageArray = ["http://www.waynejagoe.com/wp-content/uploads/2014/12/Albert-Einstein-HD.jpg",
            "http://www.countercurrents.org/gandhi190714.jpg",
        "http://assets.vancitybuzz.com/wp-content/uploads/2014/08/der-14-dalai-lama-in-huettenberg-a27956182.jpg?056236",
        "https://dy00k1db5oznd.cloudfront.net/wp-content/uploads/2014/08/494247045-crop.jpg",
        "http://acumen.org/content/uploads/2012/03/Dr.-King1.jpg",
        "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcTSk4bedX6r_Y3i-vUHB2-sFtHhW3hooiw70GpoRyZC6tqZ5GX3qQ",
        "http://img1.rnkr-static.com/list_img_v2/2935/282935/C480/a-list-of-famous-ralph-waldo-emerson-quotes-u5.jpg",
        "http://www.countercurrents.org/gandhi190714.jpg",
        "http://i-cdn.phonearena.com/images/articles/150862-image/Design-counts.jpg",
        "http://urbanintellectuals.com/wp-content/uploads/2015/06/MalcolmX.jpg",
        "http://www.waynejagoe.com/wp-content/uploads/2014/12/Albert-Einstein-HD.jpg",
        "http://www.activite-paranormale.net/extended/photo/news/jfk-black-white.jpg",
        "http://fullhdpictures.com/wp-content/uploads/2016/01/Black-White-Alan-Rickman-Photos.jpg",
        "http://data.whicdn.com/images/21925103/original.jpg",
        "http://img.wallpaperfolder.com/f/79B1D0121BB0/bill-gates-1080p-com.jpg",
        "http://media.salon.com/2015/04/abraham_lincoln.jpg",
        "https://www.alisoncebulla.com/wp-content/uploads/2015/02/mother-teresa.jpg",
        "https://i2.cdn.turner.com/cnn/dam/assets/131204175328-charlie-chaplin-tramp-city-lights-horizontal-gallery.jpg",
        "https://obamadiary.files.wordpress.com/2014/11/barack-obama.jpg",
        "http://www.entrepreneur-resources.net/wp-content/uploads/2012/10/warren-buffett-01.jpg"];

        document.body.style.backgroundImage = "url(" + imageArray[count] + ")";
        document.body.style.backgroundSize = "cover";
        document.getElementById("quote").innerHTML = quotesArray[count][0];
        document.getElementById("quoteWritter").innerHTML = " - " + quotesArray[count][1];

        count = 1;

        function generateNewQuote() 
        {
            document.body.style.backgroundImage = "url(" + imageArray[count] + ")";
            document.body.style.backgroundSize = "cover";

            document.getElementById("quote").innerHTML = quotesArray[count][0];
            document.getElementById("quoteWritter").innerHTML = " - " + quotesArray[count][1];
            
            
           document.getElementById("tweetQuote").href = "https://twitter.com/intent/tweet?hashtags=quotes&related=freecodecamp&text=" + quotesArray[count][0] + " - " + quotesArray[count][1];
           

            count = count + 1;
            if (count == 20) {
                count = 0;
            }
            var currentImg = document.body.style.backgroundImage;

            if (currentImg && currentImg.style) {
                currentImg.style.height = '100%';
                currentImg.style.width = '100%';
            }
        }
              
            
!
999px

Console