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="tick" data-did-init="handleTickInit">
  <div data-repeat="true" data-layout="horizontal fit" data-transform="preset(d, h, m, s) -> delay">
    <div class="tick-group">
      <div data-key="value" data-repeat="true" data-transform="pad(00) -> split -> delay">
        <span data-view="flip"></span>
      </div>
      <span data-key="label" data-view="text" class="tick-label"></span>
    </div>
  </div>
</div>
              
            
!

CSS

              
                .tick {
  font-size:1rem;
  white-space:nowrap;
  font-family:arial,sans-serif;
  width: 600px;
  max-width: 100%;
  margin: 30px auto 0;
}

.tick-flip,.tick-text-inline {
  font-size:2.5em;
}

.tick-label {
  margin-top:1em;
  font-size:1em;
}

.tick-char {
  width:1.5em;
}

.tick-text-inline {
  display:inline-block;
  text-align:center;
  min-width:1em;
}

.tick-text-inline+.tick-text-inline {
  margin-left:-.325em;
}

.tick-group {
  margin:0 .5em;text-align:center;
}

body {
   background-color: #E0E3DA; 
}

.tick-text-inline {
   color: #FFFFF3; 
}

.tick-label {
   color: #A593E0; 
}

.tick-flip-panel {
   color: rgb(255, 255, 255); 
}

.tick-flip {
   font-family: 'Oswald', sans-serif; 
}

.tick-flip-panel-text-wrapper {
   line-height: 1.35; 
}

.tick-flip-panel {
   background-color: #566270; 
}

.tick-flip {
   border-radius:0.12em; 
}
              
            
!

JS

              
                function handleTickInit(tick) {
  // define the countdown schedule using natural language,
  // you can find some example schedules below.

  // - 'every hour'
  // - 'every minute'
  // - 'every 2 hours'
  // - 'every 10 minutes'
  // - 'every 45 seconds'
  // - 'till 10 every hour'
  // - 'from 13 every hour'
  // - 'from 12 till 15 every hour'
  // - 'every hour wait 10 minutes'
  // - 'every day at 13:15:40'
  // - 'every day at 11'
  // - 'every day at 11 wait 2 hours'
  // - 'every monday at 12'
  // - 'every sunday at 11 wait 2 hours'
  // - 'sunday every hour from 10 till 12'
  // - 'sunday every hour wait 10 minutes'
  // - 'every 1st day of the month at 12:00'
  // - 'every 2nd day of the month at 12:00'
  // - 'every first day of the month at 12:00'
  // - 'every last day of the month at 12:00'
  // - 'every 1st day of the month at 11:55 wait 10 minutes'
  // - 'every 2nd day of the month from 10 till 14 every hour wait 10 minutes'
  // - 'every januari the 12th at 12:00'
  // - 'every 12th of januari at 12:00'

  // combine multiple schedules
  // - 'monday at 12, tuesday at 14, friday at 12'

  // pass timezone
  // Tick.count.schedule('every monday at 12:00', { timezone: '+01:00' })

  // create the schedule counter
  Tick.count.schedule('every friday at 18:30').onupdate = function(value) {
    tick.value = value;
  }
}
              
            
!
999px

Console