cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

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.

            
              <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
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console