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.

            
              <!DOCTYPE html>
<html>
<head>
	<title></title>
    <link href='https://fonts.googleapis.com/css?family=Muli:400,300' rel='stylesheet' type='text/css'>
	<link rel="stylesheet" href="C:\Users\Daniel\Desktop\Dropbox\Web Work\Resources to Keep\normalize.css">
	<link rel="stylesheet" href="css/style.css">
</head>
<body>

<div id="quote-box" class="clearfix">
    <p id="quote">I'm the Dude, so that's what you call me. That or, uh His Dudeness, or uh Duder, or El Duderino, if you're not into the whole brevity thing.</p>
    <p id="person">&ndash; The Dude</p>
    <button id="twitter" class="btn">tweet</button>
    <button id="new" class="btn" target="_blank">New Quote</button>
</div>

<br>
<a id="codepen" href="https://codepen.io/beeramir/" target="_blank">by daniel</a>

<script src="js/script.js"></script>
</body>
</html>
            
          
!
            
              * {
	box-sizing: border-box;
    font-family: 'Muli', sans-serif;
    color: #333;
    /*border: 1px solid red;*/
}

.clearfix::after {
   content: "";
   display: table;
   clear: both;
}

body {
    background-color: #7A6C5B;
    text-align: center;
}

#quote-box {
    width: 550px;
    height: auto;
    background-color: #FFFEED;
    border-radius: 5px;
    box-shadow: 3px 3px 3px rgba(0,0,0,.33);
    padding: 50px;
    margin: 150px auto 0 auto;
}

#quote {
    font-size: 1.17em;
    font-weight: bold;
    line-height: 1.5em;
}

#person {
    font-size: .85em;
    font-weight: bold;
    text-align: right;
    margin-right: 50px;
}

.btn {
    font-size: 1em;
    color: #fff;
    background-color: #62A7CC;
    padding: 10px 25px;
    border: none;
    border-radius: 3px;
    opacity: 1;
    margin-top: 25px;
}

.btn:hover {
    opacity: .88;
}

#twitter {
    float: left;
}

#new {
    float: right;
}

#codepen {
    font-size: .85em;
    font-weight: 300;
    color: rgba(255,255,255,.5);
    text-decoration: none;
}

#codepen:hover {
    text-decoration: underline;
}
            
          
!
            
              var quotes = [

    {
        quote: "I'm the Dude, so that's what you call me. That or, uh His Dudeness, or uh Duder, or El Duderino, if you're not into the whole brevity thing.",
        person: "The Dude"
    },
    {
        quote: "If my calculations are correct, when this baby hits 88 miles per hour... you're gonna see some serious shit.",
        person: "Dr. Emmett Brown"
    },
    {
        quote: "Hello, my name is Inigo Montoya! You killed my father! Prepare to die!",
        person: "Inigo Montoya"
    }

]

function getQuote() {
    
    html_quote ='';
    html_person ='&ndash; ';
    var random = Math.floor(Math.random() * quotes.length);

    html_quote += quotes[random].quote;
    html_person += quotes[random].person;

    document.getElementById('quote').innerHTML = html_quote;
    document.getElementById('person').innerHTML = html_person;
}

document.getElementById('new').addEventListener('click', getQuote);

getQuote();
            
          
!
999px
Loading ..................

Console