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

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