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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

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.

            
              <!-- Root page wrappper -->
  <div class="page">
    <div class="page-container">
        
	<!-- Timepicker widget root element (tp = Timepicker)-->
    <div class="widget widget--timepick">
		
	<!-- tp footer element -->
    <div class="timepicker-wrap timepick-footer"></div>
		  
	 <!-- tp footer radio buttons & text -->
    <input class="timepick-base timepick-base--handle timepick-hour--handle" type="radio" name="base-handle" checked value="">
    <span class="timepick-base timepick-base--text timepick-hour"></span>
	  <span class="timepick-base timepick-colon">:</span>
    <input class="timepick-base timepick-base--handle timepick-min--handle" type="radio" name="base-handle" value="">
    <span class="timepick-base timepick-base--text timepick-min"></span>
		  
	  <!-- tp root hour section -->
    <div class="timepick-wrap timepick-section timepick-section--hour">
	    <input class="timepick-item item-handle item-handle-1" type="radio" name="hour-handle" value="" >
		  <div data-text="12" class="timepick-item item-text item-text-1">12</div>
		  <input class="timepick-item item-handle item-handle-2" type="radio" name="hour-handle" value="" >
		  <div data-text="01" class="timepick-item item-text item-text-2">1</div>
		  <input class="timepick-item item-handle item-handle-3" type="radio" name="hour-handle" value="" >
		  <div data-text="02" class="timepick-item item-text item-text-3">2</div>
		  <input class="timepick-item item-handle item-handle-4" type="radio" name="hour-handle" value="" >
		  <div data-text="03" class="timepick-item item-text item-text-4">3</div>
		  <input class="timepick-item item-handle item-handle-5" type="radio" name="hour-handle" value="" >
		  <div data-text="04" class="timepick-item item-text item-text-5">4</div>
		  <input class="timepick-item item-handle item-handle-6" type="radio" name="hour-handle" value="" >
		  <div data-text="05" class="timepick-item item-text item-text-6">5</div>
		  <input class="timepick-item item-handle item-handle-7" type="radio" name="hour-handle" value="" >
		  <div data-text="06" class="timepick-item item-text item-text-7">6</div>
		  <input class="timepick-item item-handle item-handle-8" type="radio" name="hour-handle" value="" >
		  <div data-text="07" class="timepick-item item-text item-text-8">7</div>
		  <input class="timepick-item item-handle item-handle-9" type="radio" name="hour-handle" value="" >
		  <div data-text="08" class="timepick-item item-text item-text-9">8</div>
		  <input class="timepick-item item-handle item-handle-10" type="radio" name="hour-handle" value="" >
		  <div data-text="09" class="timepick-item item-text item-text-10">9</div>
		  <input class="timepick-item item-handle item-handle-11" type="radio" name="hour-handle" value="" >
		  <div data-text="10" class="timepick-item item-text item-text-11">10</div>
		  <input class="timepick-item item-handle item-handle-12" type="radio" name="hour-handle" value="" >
		  <div data-text="11" class="timepick-item item-text item-text-12">11</div>
			
		  <!-- tp arms (hour & mins)-->
			<div class="timepick-arms">
			  <div class="timepick-arms-item timepick-arms-hour timepick-arms-handle"></div>
			  <div class="timepick-arms-item timepick-arms-min timepick-hide"></div>
			</div>
			
		  <!-- tp hidden footer text -->
       <span class="timepick-base timepick-base--text timepick-hour timepick-base--hidden timepick-hidden-item-1">12</span>
       <span class="timepick-base timepick-base--text timepick-hour timepick-base--hidden timepick-hidden-item-2">01</span>
       <span class="timepick-base timepick-base--text timepick-hour timepick-base--hidden timepick-hidden-item-3">02</span>
       <span class="timepick-base timepick-base--text timepick-hour timepick-base--hidden timepick-hidden-item-4">03</span>
       <span class="timepick-base timepick-base--text timepick-hour timepick-base--hidden timepick-hidden-item-5">04</span>
       <span class="timepick-base timepick-base--text timepick-hour timepick-base--hidden timepick-hidden-item-6">05</span>
       <span class="timepick-base timepick-base--text timepick-hour timepick-base--hidden timepick-hidden-item-7">06</span>
       <span class="timepick-base timepick-base--text timepick-hour timepick-base--hidden timepick-hidden-item-8">07</span>
       <span class="timepick-base timepick-base--text timepick-hour timepick-base--hidden timepick-hidden-item-9">08</span>
       <span class="timepick-base timepick-base--text timepick-hour timepick-base--hidden timepick-hidden-item-10">09</span>
       <span class="timepick-base timepick-base--text timepick-hour timepick-base--hidden timepick-hidden-item-11">10</span>
       <span class="timepick-base timepick-base--text timepick-hour timepick-base--hidden timepick-hidden-item-12">11</span>
     </div>
		  
		<!-- tp root min section -->
     <div class="timepick-wrap timepick-section timepick-section--min">
		   <input class="timepick-item item-handle item-handle-1" type="radio" name="min-handle" value="" >
		   <div data-text="00" class="timepick-item item-text item-text-1">00</div>
		   <input class="timepick-item item-handle item-handle-2" type="radio" name="min-handle" value="" >
		   <div data-text="05" class="timepick-item item-text item-text-2">5</div>
		   <input class="timepick-item item-handle item-handle-3" type="radio" name="min-handle" value="" >
		   <div data-text="10" class="timepick-item item-text item-text-3">10</div>
		   <input class="timepick-item item-handle item-handle-4" type="radio" name="min-handle" value="" >
		   <div data-text="15" class="timepick-item item-text item-text-4">15</div>
		   <input class="timepick-item item-handle item-handle-5" type="radio" name="min-handle" value="" >
		   <div data-text="20" class="timepick-item item-text item-text-5">20</div>
		   <input class="timepick-item item-handle item-handle-6" type="radio" name="min-handle" value="" >
		   <div data-text="25" class="timepick-item item-text item-text-6">25</div>
		   <input class="timepick-item item-handle item-handle-7" type="radio" name="min-handle" value="" >
		   <div data-text="30" class="timepick-item item-text item-text-7">30</div>
		   <input class="timepick-item item-handle item-handle-8" type="radio" name="min-handle" value="" >
		   <div data-text="35" class="timepick-item item-text item-text-8">35</div>
		   <input class="timepick-item item-handle item-handle-9" type="radio" name="min-handle" value="" >
		   <div data-text="40" class="timepick-item item-text item-text-9">40</div>
		   <input class="timepick-item item-handle item-handle-10" type="radio" name="min-handle" value="" >
		   <div data-text="45" class="timepick-item item-text item-text-10">45</div>
		   <input class="timepick-item item-handle item-handle-11" type="radio" name="min-handle" value="" >
		   <div data-text="50" class="timepick-item item-text item-text-11">50</div>
		   <input class="timepick-item item-handle item-handle-12" type="radio" name="min-handle" value="" >
		   <div data-text="55" class="timepick-item item-text item-text-12">55</div>
			
		   <!-- tp arms (hour & mins)-->
			<div class="timepick-arms">
			  <div class="timepick-arms-item timepick-arms-hour timepick-hide"></div>
			  <div class="timepick-arms-item timepick-arms-min timepick-arms-handle"></div>
			</div>
			
		   <!-- tp hidden footer text -->
        <span class="timepick-base timepick-base--text timepick-min timepick-base--hidden timepick-hidden-item-1">00</span>
        <span class="timepick-base timepick-base--text timepick-min timepick-base--hidden timepick-hidden-item-2">05</span>
        <span class="timepick-base timepick-base--text timepick-min timepick-base--hidden timepick-hidden-item-3">10</span>
        <span class="timepick-base timepick-base--text timepick-min timepick-base--hidden timepick-hidden-item-4">15</span>
        <span class="timepick-base timepick-base--text timepick-min timepick-base--hidden timepick-hidden-item-5">20</span>
        <span class="timepick-base timepick-base--text timepick-min timepick-base--hidden timepick-hidden-item-6">25</span>
        <span class="timepick-base timepick-base--text timepick-min timepick-base--hidden timepick-hidden-item-7">30</span>
        <span class="timepick-base timepick-base--text timepick-min timepick-base--hidden timepick-hidden-item-8">35</span>
        <span class="timepick-base timepick-base--text timepick-min timepick-base--hidden timepick-hidden-item-9">40</span>
        <span class="timepick-base timepick-base--text timepick-min timepick-base--hidden timepick-hidden-item-10">45</span>
        <span class="timepick-base timepick-base--text timepick-min timepick-base--hidden timepick-hidden-item-11">50</span>
        <span class="timepick-base timepick-base--text timepick-min timepick-base--hidden timepick-hidden-item-12">55</span>
      </div>
		  
    </div>
  </div>
</div>

            
          
!
            
              /*Meyer reset.css with some modifications*/
html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,abbr,address,cite,code,del,dfn,em,img,ins,kbd,q,samp,small,strong,sub,sup,var,b,i,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;box-sizing:border-box;position:relative;outline:0;font-size:100%;vertical-align:baseline;background:transparent}

/*Generic font-face*/
@font-face {
  font-family: "Roboto";
}

/*Generic animation keyframes*/
@keyframes ease-out-scale {
  0% {
    opacity: 0;
    transform: scale(0);
	z-index: 11
  }
  100% {
    opacity: 1;
    transform: scale(1);
	z-index: 11
  }
}
@keyframes slide-in-left {
  0% {
    opacity: 0;
    transform: translate(40%, 0);
	z-index: 11
  }
  100% {
    opacity: 1;
    transform: translate(0, 0);
	z-index: 11
  }
}
@keyframes slide-in-right {
  0% {
    opacity: 0;
    transform: translate(-40%, 0);
	z-index: 11
  }
  100% {
    opacity: 1;
    transform: translate(0, 0);
	z-index: 11
  }
}

body,
html,
.page {
  background: url(http://www.bradysammons.com/codepen/darkui/noise.png) repeat;
  height: 100%;
  width: 100%
}
body {
  color: #757575;
  font: 14px/1 "Roboto", sans-serif;
  min-width: 1250px;
  text-align: center;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased
}

/*Timepicker: utility rules*/
.timepick-hide {
  display: none
}

/*Timepicker: page content*/
.page .page-container {
  background: url(http://www.bradysammons.com/codepen/darkui/noise.png) repeat;
  margin: 0 auto;
  padding: 2%;
  width: 96%
}
/*Timepicker: Root widget*/
.page .widget {
  background: #373738;
  box-shadow: inset 0 2px 1px -1px rgba(255, 255, 255, 0.2), inset 0 -2px 1px -1px rgba(0, 0, 0, 0.2), 0 15px 18px rgba(0, 0, 0, 0.5), 0 4px 6px rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  height: 450px;
  margin: inherit;
  width: 40%
}
.widget--timepick .timepicker-wrap {
  width: 100%
}
/*Timepicker: widget footer*/
.widget--timepick .timepick-footer{
  background: #373738;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 1px 0 rgba(255,255,255,.2) inset;
  bottom: 0;
  height: 50px;
  left: 0;
  position: absolute;
  right: 0
}
/*Timepicker: widget footer buttons*/
.widget--timepick .timepick-base {
  bottom: 5px;
  left: 51%;
  position: absolute
}
.widget--timepick .timepick-base--text {
  background: linear-gradient(to bottom, rgba(46,46,46,1) 0%,rgba(34,34,34,1) 100%);
  border: 1px solid #141414;
  box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 1px 0 rgba(255,255,255,.2) inset;
  color: #bcbcbc;
  font: 2.2em/1.3 'roboto-regular', sans-serif;
  height: 40px;
  text-shadow: 0 2px 0 #555;
  width: 40px
}
.widget--timepick .timepick-base--handle {
  cursor: pointer;
  bottom: 2px;
  height: 45px;
  margin: 6px 0 0;
  opacity: 0;
  width: 45px;
  z-index: 100
}
.widget--timepick .timepick-hour,
.widget--timepick .timepick-hour--handle {
  left: 39%
}
.widget--timepick .timepick-colon {
  color: #fff;
  left: 48.35%;
  font: 2.2em/1.4 'Roboto', sans-serif
}
/*Timepicker: widget generic hour and min section*/
.widget--timepick .timepick-section {
  background: url(http://www.bradysammons.com/codepen/darkui/noise.png) repeat;
  height: 85%;
  margin: 8px 5px;
  opacity: 0;
  position: absolute;
  width: 98%;
  transition: all .3s ease-out
}

/*
 * Timepicker: widget root sections & child elements lazy anims
 */
.timepick-hour--handle:checked ~ .timepick-section--hour {
  animation: slide-in-left 0.3s 0.3s 1 ease-in-out forwards
}
.timepick-min--handle:checked ~ .timepick-section--min {
  animation: slide-in-right 0.3s 0.3s 1 ease-in-out forwards
}
.timepick-section .item-text:nth-of-type(1),
.timepick-section .item-text:nth-of-type(4),
.timepick-section .item-text:nth-of-type(7),
.timepick-section .item-text:nth-of-type(10) {
  animation: ease-out-scale 0.5s 0.5s 1 cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards
}
.timepick-section .item-text:nth-of-type(2),
.timepick-section .item-text:nth-of-type(6),
.timepick-section .item-text:nth-of-type(8),
.timepick-section .item-text:nth-of-type(12) {
  animation: ease-out-scale 0.5s 1s 1 cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards
}
.timepick-section .item-text:nth-of-type(3),
.timepick-section .item-text:nth-of-type(5),
.timepick-section .item-text:nth-of-type(9),
.timepick-section .item-text:nth-of-type(11) {
  animation: ease-out-scale 0.5s 1.5s 1 cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards
}

/*Timepicker: generic hour & min blocks*/
.widget--timepick .timepick-item {
  cursor: pointer;
  height: 35px;
  left: 0;
  position: absolute;
  top: 0;
  width: 35px
}
.widget--timepick .item-text {
  background: linear-gradient(to bottom, rgba(46,46,46,1) 0%,rgba(34,34,34,1) 100%);
  border: 1px solid #141414;
  box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 1px 0 rgba(255,255,255,.2) inset;
  color: #bcbcbc;
  border-radius: 50%;
  font: 300 1.3em/1.8 'Roboto', sans-serif;
  opacity: 0;
  text-shadow:0 1px 0 rgba(0,0,0,.6)
}
/*Timepicker: root sections hour & mins buttons alignment*/
.widget--timepick .item-handle-1,
.widget--timepick .item-text-1 { left: 45%; top: 5% }
.widget--timepick .item-handle-7,
.widget--timepick .item-text-7 { left: 45%; top: 85% }
.widget--timepick .item-handle-2,
.widget--timepick .item-text-2 { left: 62%; top: 14% }
.widget--timepick .item-handle-6,
.widget--timepick .item-text-6 { left: 62%; top: 76% }
.widget--timepick .item-handle-12,
.widget--timepick .item-text-12 { left: 28%; top: 14% }
.widget--timepick .item-handle-8,
.widget--timepick .item-text-8 { left: 28%; top: 76% }
.widget--timepick .item-handle-3,
.widget--timepick .item-text-3 { left: 74%; top: 29% }
.widget--timepick .item-handle-11,
.widget--timepick .item-text-11 { left: 16%; top: 29% }
.widget--timepick .item-handle-5,
.widget--timepick .item-text-5 { left: 74%; top: 61% }
.widget--timepick .item-handle-9,
.widget--timepick .item-text-9 { left: 16%; top: 61% }
.widget--timepick .item-handle-4,
.widget--timepick .item-text-4 { left: 82%; top: 45% }
.widget--timepick .item-handle-10,
.widget--timepick .item-text-10 { left: 8%; top: 45% }
.widget--timepick .item-handle {
  margin: 0 2px 0 0;
  opacity: 0;
  z-index: 50
}

/*Timepicker: section child button click logic*/
.widget--timepick .timepick-base.timepick-base--hidden{
  background: none;
  color: #fff;
  border: none;
  bottom: -55px;
  box-shadow: none;
  opacity: 0;
  text-shadow: none
}
.widget--timepick .item-handle-1:checked ~ .timepick-hidden-item-1,
.widget--timepick .item-handle-2:checked ~ .timepick-hidden-item-2,
.widget--timepick .item-handle-3:checked ~ .timepick-hidden-item-3,
.widget--timepick .item-handle-4:checked ~ .timepick-hidden-item-4,
.widget--timepick .item-handle-5:checked ~ .timepick-hidden-item-5,
.widget--timepick .item-handle-6:checked ~ .timepick-hidden-item-6,
.widget--timepick .item-handle-7:checked ~ .timepick-hidden-item-7,
.widget--timepick .item-handle-8:checked ~ .timepick-hidden-item-8,
.widget--timepick .item-handle-9:checked ~ .timepick-hidden-item-9,
.widget--timepick .item-handle-10:checked ~ .timepick-hidden-item-10,
.widget--timepick .item-handle-11:checked ~ .timepick-hidden-item-11,
.widget--timepick .item-handle-12:checked ~ .timepick-hidden-item-12 {
  animation: ease-out-scale 0.3s 0.3s 1 cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards
}

/*Timepicker: hour and min arms block*/
/******Absolute Centering technique******/
.widget--timepick .timepick-arms {
  animation: ease-out-scale 0.5s 2s 1 cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  background: linear-gradient(to bottom, rgba(46,46,46,1) 0%,rgba(34,34,34,1) 100%);
  border: 1px solid #141414;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 1px 0 rgba(255,255,255,.2) inset;
  bottom: 0;
  height: 15px;
  left: 0;
  margin: auto;
  opacity: 0;
  position: absolute;
  right: 0;
  text-shadow:0 1px 0 rgba(0,0,0,.6);
  top: 0;
  width: 15px
}
/*Timepicker: hour & mins arms */
.widget--timepick .timepick-arms > .timepick-arms-item {
  background: linear-gradient(to bottom, rgba(46,46,46,1) 0%, rgba(34,34,34,1) 100%);
  border: 1px solid #141414;
  left: 42%;
  height: 5px;
  position: absolute;
  top: 45%;
  transform-origin: left top;
  transform: rotate(-90deg);
  transition: transform .6s .5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  width: 500%
}
.widget--timepick .timepick-arms > .timepick-arms-min {
  width: 700%
}
/*Timepicker: arms movement on hour & min blocks click logic*/
.timepick-section .item-handle-1:checked ~ .timepick-arms > .timepick-arms-handle {
  transform: rotate(-90deg)
}
.timepick-section .item-handle-2:checked ~ .timepick-arms > .timepick-arms-handle {
  transform: rotate(-58deg)
}
.timepick-section .item-handle-3:checked ~ .timepick-arms > .timepick-arms-handle {
  transform: rotate(-28deg)
}
.timepick-section .item-handle-4:checked ~ .timepick-arms > .timepick-arms-handle {
  transform: rotate(0deg)
}
.timepick-section .item-handle-5:checked ~ .timepick-arms > .timepick-arms-handle {
  transform: rotate(30deg)
}
.timepick-section .item-handle-6:checked ~ .timepick-arms > .timepick-arms-handle {
  transform: rotate(60deg)
}
.timepick-section .item-handle-7:checked ~ .timepick-arms > .timepick-arms-handle {
  transform: rotate(90deg)
}
.timepick-section .item-handle-8:checked ~ .timepick-arms > .timepick-arms-handle {
  transform: rotate(120deg)
}
.timepick-section .item-handle-9:checked ~ .timepick-arms > .timepick-arms-handle {
  transform: rotate(150deg)
}
.timepick-section .item-handle-10:checked ~ .timepick-arms > .timepick-arms-handle {
  transform: rotate(180deg)
}
.timepick-section .item-handle-11:checked ~ .timepick-arms > .timepick-arms-handle {
  transform: rotate(210deg)
}
.timepick-section .item-handle-12:checked ~ .timepick-arms > .timepick-arms-handle {
  transform: rotate(240deg)
}

/*Timepicker: generic buttons user interaction*/
input[type=radio] + .timepick-item,
input[type=radio] + .timepick-base {
  transition: all .3s ease-in-out
}
input[type=radio]:hover + .timepick-item,
input[type=radio]:hover + .timepick-base,
input[type=radio]:focus + .timepick-item,
input[type=radio]:focus + .timepick-base{
  background: linear-gradient(to bottom, rgba(64,64,64,1) 0%,rgba(47,47,47,1) 100%);
  border-color: #222;
  color: #d0d0d0;
  text-shadow:0 1px 0 rgba(0,0,0,.7)
}
input[type=radio]:active + .timepick-item,
input[type=radio]:active + .timepick-base,
input[type=radio]:checked + .timepick-item,
input[type=radio]:checked + .timepick-base {
  background: linear-gradient(to bottom, rgba(23,23,23,1) 0%, rgba(40,40,40,1) 100%);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(0,0,0,.8) inset;
  font-weight: bold;
  text-shadow: 0 1px 0 rgba(0,0,0,.3)
}
            
          
!
            
              /*
 * HTML & CSS Timepicker (No Js)
 * @author Zahin Omar Alwa
 *
 * A functional timepicker simulation using pure html * semantic elements and css3 goodies !
 */
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console