css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

            
              <div class="wrapper">

<header><h1>Nixie Clock</h1></header>

<div class="tube first">
<p></p>
<div id="hour1"></div>
<div class="grid"></div>
</div>

<div class="tube"><p></p>
<div id="hour2"></div>
<div class="grid"></div>
</div>

<div class="divider">
<p>:</p>
<div class="grid"></div>
</div>

<div class="tube"><p></p>
<div id="minute1"></div>
<div class="grid"></div>
</div>

<div class="tube"><p></p>
<div id="minute2"></div>
<div class="grid"></div>
</div>

<div class="divider">
<p>:</p>
<div class="grid"></div>
</div>

<div class="tube"><p></p>
<div id="second1"></div>
<div class="grid"></div>
</div>

<div class="tube"><p></p>
<div id="second2"></div>
<div class="grid"></div>
</div>

<div class="base"></div>

</div><!--wrapper-->
            
          
!
            
              html {
    height: 100%;
}
body {
    height: 100%;
    margin: 0;
    background-repeat: no-repeat;
    background-attachment: fixed;
	font-family: 'Nixie One', cursive;
	background: #2b4654;
background: -moz-radial-gradient(bottom, ellipse cover,  #2b4654 0%, #2a282a 100%);
background: -webkit-gradient(radial, bottom center, 0px, center center, 100%, color-stop(0%,#2b4654), color-stop(100%,#2a282a));
background: -webkit-radial-gradient(bottom, ellipse cover,  #2b4654 0%,#2a282a 100%);
background: -o-radial-gradient(bottom, ellipse cover,  #2b4654 0%,#2a282a 100%);
background: -ms-radial-gradient(bottom, ellipse cover,  #2b4654 0%,#2a282a 100%);
background: radial-gradient(ellipse at bottom,  #2b4654 0%,#2a282a 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2b4654', endColorstr='#2a282a',GradientType=1 );


	
}

/*TYPE*/

h1 {
	text-shadow: 0px 0px 3px red;  
	color: rgba(236,165,0,1);
	font-size: 40px;
}



/*HEADER*/

header {
	text-align: center;
	margin: 20px 20px 34px;
}

/*MAIN*/

.wrapper { width:960px; margin:0 auto; }

.tube {	
	font-size: 166px;
	color: rgba(0,0,0,0.3);
	width: 130px;
	height: 246px;
	text-align: center;
	float: left;
	border: 1px solid white;
	border-radius: 50px 50px 0 0;
	padding-top: 30px;
}

.tube p:before {
   content: "123456789";
   letter-spacing: -95px;
	position: relative;
	z-index: 0;
}

.tube p {
	text-align: center;
	margin-left: -33px;
}

.tube div {
	position: relative;
	top: -167px;
	/*#f48e0e;*/
	 text-shadow: 0px 0px 5px red;  
	color: rgba(236,165,0,1);
}

.divider {
	float: left;
	text-shadow: 0px 0px 5px red;  
	color: rgba(236,165,0,1);
	font-size: 76px;
	border: 1px solid white;
	border-radius: 10px;
	margin-top: 67px;
	height: 95px;
	z-index: 11;
	position: relative;
}

.tube, .divider {
	margin-right: 13px;
	background: -moz-linear-gradient(-45deg,  rgba(255,255,255,1) 0%, rgba(255,255,255,0) 35%);
background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,rgba(255,255,255,1)), color-stop(35%,rgba(255,255,255,0)));
background: -webkit-linear-gradient(-45deg,  rgba(255,255,255,1) 0%,rgba(255,255,255,0) 35%);
background: -o-linear-gradient(-45deg,  rgba(255,255,255,1) 0%,rgba(255,255,255,0) 35%);
background: -ms-linear-gradient(-45deg,  rgba(255,255,255,1) 0%,rgba(255,255,255,0) 35%);
background: linear-gradient(135deg,  rgba(255,255,255,1) 0%,rgba(255,255,255,0) 35%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#00ffffff',GradientType=1 );

}

.first {
	margin-left: 18px;
}

.base {
	border: 1px solid white;
	clear: both;
	height: 110px;
	margin-top: 16px;
	float: left;
	width: 96%;
  margin-left: 2%;
  margin-right: 2%;

}

.grid {
	background: #535353 url(https://googledrive.com/host/0BxTz8uiHWZpeNmtZZkJvdDNyRUE/hex-grid.svg);
	background-size:22px 25px;
	width: 110px;
	height: 150px;
	top: 0;
	margin-top: -155px;
	margin-right: auto;
	margin-left: auto;
	z-index: -1;
	border-radius:15px;
	opacity: 0.5;
	border: 1px solid #535353;
}

.divider .grid {
	width: 65%;
	height: 60px;
	margin-top: -61px;
}

.divider p {
	z-index: 2;
	position: relative;
}
            
          
!
            
              function checkTime(i) {
    if (i < 10) {
        i = "0" + i;
    }
    return i;
}

function startTime() {
    var today = new Date();
    var h = today.getHours();
    var m = today.getMinutes();
    var s = today.getSeconds();
	
	  h = checkTime(h);
    m = checkTime(m);
    s = checkTime(s);
	
	hSplit = h.toString().split('');
	mSplit = m.toString().split('');
	sSplit = s.toString().split('');
	
    document.getElementById('hour1').innerHTML = hSplit[0];
	document.getElementById('hour2').innerHTML = hSplit[1];
	document.getElementById('minute1').innerHTML = mSplit[0];
	document.getElementById('minute2').innerHTML = mSplit[1];
	document.getElementById('second1').innerHTML = sSplit[0];
	document.getElementById('second2').innerHTML = sSplit[1];
	
    t = setTimeout(function () {
        startTime()
    }, 500);
}
startTime();
            
          
!
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.
Loading ..................

Console