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.

            
              <body>

	<div class="outer-face">
		<div class="marker one"></div>
		<div class="marker two"></div>
		<div class="marker four"></div>
		<div class="marker five"></div>
		<div class="face">
			<div id="hours" class="me hours"></div>
			<div id="minuts" class="me minuts"></div>
			<div id="seconds" class="me seconds"></div>
			<p id="dat" class="dat"></p>
		</div>

	</div>
 </body> 
            
          
!
            
              body
{
	padding: 100px 40%;
}
.outer-face
{
	position: relative;
	width: 250px;
	height: 250px;
	border-radius: 50%;
	background: white;
	box-shadow: inset 0 0 10px #000;
	border: 14px solid black;
}
.outer-face::before ,
.outer-face::after
{
	content: "";
	background-color: black;
	width: 10px;
	height: 100%;
	position: absolute;
	text-align: center;
	margin-left: -5px;
	left: 50%;
}

.outer-face::after { 
-moz-transform: rotate(90deg);
-ms-transform: rotate(90deg);
-webkit-transform: rotate(90deg);
transform: rotate(90deg)
}
.outer-face .marker::before,.outer-face .marker::after,.outer-face .marker
{
	content: "";
	background-color: #910202;
	width:12px;
	height: 100%;
	position: absolute;
	left: 50%;
	margin-left: -5px;
}
.outer-face .one
{
	-moz-transform: rotate(30deg);
	-ms-transform: rotate(30deg);
	-webkit-transform: rotate(30deg);
	transform: rotate(30deg)
}
.outer-face .two
{
	-moz-transform: rotate(60deg);
	-ms-transform: rotate(60deg);
	-webkit-transform: rotate(60deg);
	transform: rotate(60deg)
}
.outer-face .four
{
	-moz-transform: rotate(120deg);
	-ms-transform: rotate(120deg);
	-webkit-transform: rotate(120deg);
	transform: rotate(120deg)
}
.outer-face .five
{
	-moz-transform: rotate(150deg);
	-ms-transform: rotate(150deg);
	-webkit-transform: rotate(150deg);
	transform: rotate(150deg)
}
.outer-face .face
{
	width: 90%;
	height: 90%;
	background-color: #FFF;
	position: absolute;
	border-radius: 50%;
	z-index: 9999;
	left: 5%;
	top: 5%;
}
.outer-face .face::before
{
	content: "";
	background-color: black;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	margin-left: -10px;
	margin-top: -10px;
	position: absolute;
	left: 50%;
	top: 50%;
	box-shadow: 0 0 30px black;
	z-index: 9999;
}

.outer-face .face .me
{
	width: 6px;
	height: 30%;
	position: absolute;
	background-color: black;
	left: calc(50% - 6px);
    top: 20%;
    transform-origin: bottom;
    transform: rotate(0deg);
} 
.outer-face .face .minuts
{
	width: 4px;
	height: 40%;
	position: absolute;
	background-color: black;
	left: calc(50% - 6px);
    top: 10%;
    transform-origin: bottom;
    transform: rotate(0deg);
}
.outer-face .face .seconds
{
	width: 2px;
	height: 45%;
	position: absolute;
	background-color: red;
	left: calc(50% - 3px);
    top: 6%;
    transform-origin: bottom;
    transform: rotate(0deg);
    z-index: 3;
}
.dat
{
	position: absolute;
	border:1px solid #000;
	box-shadow: inset 0 0 5px black;
	padding: 2px;
	top:38%;
	right: 13%;
}
            
          
!
            
              var hours=document.getElementById('hours'),
	minuts=document.getElementById('minuts'),
	seconds=document.getElementById('seconds');
	dat=document.getElementById('dat');
	var i=0;
		function showdate(){
			'use strict';
		var mydate=new Date();
		var	myscond=mydate.getSeconds(),
			mymin=mydate.getMinutes(),
			myhour=mydate.getHours();
			// hands of my clock
			//seconds
			seconds.style.transform="rotate("+ myscond*6 +"deg)";
			//minutes
			minuts.style.transform="rotate("+ mymin*6 +"deg)";
			// Hours
			hours.style.transform="rotate("+ myhour*30 +"deg)";
			// text of my clock
			dat.textContent=myhour + ':' + mymin + ':' + myscond;
		}
		window.onload=function(){
			'use strict';
			setInterval(showdate, 500);
		};


 


            
          
!
999px
Loading ..................

Console