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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

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 href='https://fonts.googleapis.com/css?family=Exo:400,900' rel='stylesheet' type='text/css'>
<div class="wrapper">
  <div class="message">
<div class="content">
  <div class="start">There are </div>
  <div class="animation">
    <div id="text">300,000</div>
  </div>

</div>
<div class="content">
  <div class="start">tech workers in</div>
    <div class="animation">
    <div id="text2">NYC</div>
  </div>
</div>
<div class="content">
  <div class="start">What if we not only</div>
    <div class="animation">
    <div id="text3">create social networks</div>
  </div>
</div>
<div class="content">
  <div class="start">but also worked together to</div>
    <div class="animation">
    <div id="text4">stop hate crimes</div>
  <div>?</div> </div> 
</div>
  </div>
</div>
              
            
!

CSS

              
                body {
  background-color: #444;
  font-size: 1.7em;
  color: #fff;
}

html, body{
  height: 100%;
}
body { 
			background-image: url(http://x-culture.org/wp-content/uploads/2017/02/160221hackathon.jpg) ;
			background-position: center center;
			background-repeat:  no-repeat;
			background-attachment: fixed;
			background-size:  cover;
			background-color: #999;
  
}

div, body{
  margin: 0;
  padding: 0;
  font-family: exo, sans-serif;
  
}
.wrapper {
  height: 100%; 
  width: 100%; 
}

.message {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  width: 100%; 
  height:45%;
 
  display: block;
  position: absolute;
  color: #fff;
  padding: 0.5em;
}


.content {

  max-width: 90vw;
}

.start {

  padding-right: 0.2em;
}

.animation {
  flex: 1;
}

#text {
  color: #444;
  animation-delay: 0s;
  animation-duration: 9s;
  animation-name: text-a;
  animation-iteration-count: infinite;
}

#text2 {
  color: #444;
  animation-delay: 0s;
  animation-duration: 9s;
  animation-name: text2-a;
  animation-iteration-count: infinite;
}

#text3 {
  color: #444;
  animation-delay: 0s;
  animation-duration: 9s;
  animation-name: text3-a;
  animation-iteration-count: infinite;
}


#text4 {
  color: #444;
  animation-delay: 0s;
  animation-duration: 9s;
  animation-name: text4-a;
  animation-iteration-count: infinite;
}

@keyframes text-a {
  0% {
    color: white;
  }
  100% {
    color: #444;
  }
}

@keyframes text2-a {
  0% {
    color: white;
  }
  100% {
    color: #444;
  }
}

@keyframes text3-a {
  0% {
    color: white;
  }
  100% {
    color: #444;
  }
}

@keyframes text4-a {
  0% {
    color: white;
  }
  100% {
    color: #444;
  }
}

              
            
!

JS

              
                var text = ['300,000', '400,000', '100,000', '50,000'];

var index = 0;

var text2 = ['NYC', 'SF', 'Baltimore', 'DC'];

var index2 = 0;

var text3 = ['create social networks', 'build temporary housing', 'develop side gigs', 'make shopping easier'];

var index3 = 0;

var text4 = ['stop hate crimes', 'solve homelessness', 'guarantee fair labor practices', 'fight climate change'];

var index4 = 0;

function changeText() {
  document.getElementById("text").innerText = text[index];
  index = (index + 1) % 4;
  
    document.getElementById("text2").innerText = text2[index2];
  index2 = (index2 + 1) % 4;
  
   document.getElementById("text3").innerText = text3[index3];
  index3 = (index3 + 1) % 4;
  
   document.getElementById("text4").innerText = text4[index4];
  index4 = (index4 + 1) % 4;
}

var interval = window.setInterval(changeText, 9000);

window.onunload = function () {
  window.clearInterval(interval);
}
              
            
!
999px

Console