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.

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.

HTML

            
              
    <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  <body onload="startTime(); startDate()">
    <div class="container">
      <div id="date"></div>
      <div id="display"></div>
      <div id="content">
        <p id="quote">"the people who are crazy enough to think they can change the world are the ones who do." <br/>- Steve Jobs</p>
      </div>
    </div>
    <div id="b-nav">
      <ul>
        <button id="gen" onclick="genQuote()">New Quote</button>
        <a class="twitter-share-button" target="_blank" href="https://twitter.com/intent/tweet?text=the%20people%20who%20are%20crazy%20enough%20to%20think%20they%20can%20change%20the%20world%20are%20the%20ones%20who%20do.%20-%20Steve%20Jobs"><i class="fa fa-twitter" aria-hidden="true"></i></a>
      </ul>
    </div>

            
          
!

CSS

            
              html, body {
  overflow-x: hidden;
  overflow-y: hidden; 
  height: 100%;
  width: 100%;
  position: absolute;
  background-color: black;
  background-image: url('https://wallpapercave.com/wp/5KLTq1z.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: top;
  z-index: -2;
}

#display {
	color: white;
	font-size: 2.9em;
	top: 10px;
  border-bottom: thin solid;
  padding-bottom: 20px;
  opacity: 0.80;
  filter: alpha(opacity=80); /* For IE8 and earlier */
}

#date {
  color: white;
  font-size: 1.3em;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-weight: normal;
  letter-spacing: 0.2em;
  opacity: 0.6;
  filter: alpha(opacity=60); /* For IE8 and earlier */
}

#footer {
  width: 100%;
  height: 40px;
  position: fixed;
  bottom: -1px;
  background-color: white;
  text-align: center;
  opacity: 0.5;
  filter: alpha(opacity=50); /* For IE8 and earlier */
}

#line {
  width: 100%;
  bottom: 4em;
  position: fixed;
  border-bottom: solid white;
  padding: 15px;
  opacity: 0.5;
  filter: alpha(opacity=50); /* For IE8 and earlier */
}

.navbar {
  position: fixed;
  width: 100%;
  opacity: 0.6;
  filter: alpha(opacity=60); /* For IE8 and earlier */
}

.wrapper {
  background-color: red;
}

span {
  border-radius: 100px;
  opacity: 0.75;
  filter: alpha(opacity=75); /* For IE8 and earlier */
}

#content {
  height: 45em;
} p {
  max-width: 30em;
  color: white;
  font-family: "Adobe Caslon Pro", "Hoefler Text", Georgia, Garamond, Times, serif;
  letter-spacing:0.1em;
  text-align:center;
  margin: 40px auto;
  text-transform: lowercase;
  line-height: 145%;
  font-size: 2em;
  font-variant: small-caps;
}

p :hover {
  text-decoration: none;
}

.container {
  padding-top: 6em;
  text-align: center;
}

#b-nav {
  padding-bottom: 5em;
  position: fixed;
  width: 100%;
  bottom: 2em;
}

#b-nav ul {
  margin: 0;
  padding: 0.5em;
  list-style-type: none;
  text-align: center;
}

#b-nav ul li {
  display: inline;
}

#b-nav ul li a {
  text-decoration: none;
  padding: .2em 1em;
  background-color: black;
  opacity: 0.4;
  filter: alpha(opacity=40); /* For IE8 and earlier */
}

.hold {
  width: 100%;
  text-align: left;
}

#gen {
  outline: none;
  padding-top: 5px;
  text-decoration: none;
  opacity: 0.6;
  background-color: black;
  color: white;
  border: thin solid white;
  height: 40px;
  width: 100px;
  border-radius: 2px;
  transition: 0.5s;
  padding-bottom: 5px;
}

#gen:hover {
  background-color: white;
  color: black;
  border: thin solid black;
  opacity: 0.8;
}

#gen a {
  text-decoration: none;
}

#date {
  color: white;
}

@media screen 
 and (max-device-width: 800px) 
  and (max-device-height: 640px) 
  and (-webkit-device-pixel-ratio: 2) 
  and (orientation: portrait) {
    p {
      font-size: 1em;
    }
}

.fa-twitter {
  font-size: 30px !important;
  margin-left: 20px;
}

            
          
!

JS

            
              function startTime() {
    var today=new Date();
    var h=today.getHours();
    var m=today.getMinutes();
    var s=today.getSeconds();
    var ampm = "";
    m = checkTime(m);

    if (h > 12) {
    	h = h - 12;
    	ampm = " PM";
    } else if (h == 12){
        h = 12;
    	ampm = " AM";
    } else if (h < 12){
        ampm = " AM";
    } else {
        ampm = "PM";
    };
  
  if(h==0) {
    h=12;
  }
    
    document.getElementById('display').innerHTML = h+":"+m+ampm;
    var t = setTimeout(function(){startTime()},500);
}

function checkTime(i) {
    if (i<10) {i = "0" + i};  // add zero in front of numbers < 10
    return i;
}

function genQuote() {
  var randNum = Math.floor(Math.random() * 8) + 1;
  document.getElementById('quote').innerHTML = quotes[randNum];
  var tweetQuote = quotes[randNum].split(' ').join('%20');
  tweetQuote = tweetQuote.split('<br>').join('');
  tweetQuote = "https://twitter.com/intent/tweet?text=" + tweetQuote.split('"').join('')
  $('.twitter-share-button').attr('href', tweetQuote);
}

//quote array
var quotes = ["Blank", "\"Dude, suckin' at something is the first step at being sorta good at something.\"<br>-  Jake <small><em>(Adventure Time)</em></small>", "\"Either I will find a way, or I will make one.\"<br> - Philip Sidney", "\"Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time.\"<br>- Thomas A. Edison", "\"You are never too old to set another goal or to dream a new dream.\"<br>- C.S Lewis", "\"If you can dream it, you can do it.\"<br>- Walt Disney", "\"Never give up, for that is just the place and time that the tide will turn.\"<br>- Harriet Beecher Stowe", "\"I know where I'm going and I know the truth, and I don't have to be what you want me to be. I'm free to be what I want.\"<br>- Muhammad Ali", "\"If you always put limit on everything you do, physical or anything else. It will spread into your work and into your life. There are no limits. There are only plateaus, and you must not stay there, you must go beyond them.\"<br>- Bruce Lee",];

//date
function startDate() {
  var d = new Date();
  var days = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];
  document.getElementById("date").innerHTML = days[d.getDay()]+" | "+[d.getMonth()+1]+"/"+d.getDate()+"/"+d.getFullYear();
}




            
          
!
999px

Console