DESIGN OF A WORKING CLOCK USING HTML AND C.S.S PART:-7

DESIGN OF A WORKING CLOCK


HI

Let Work with Animation. Today we are working on simple and easy animation. Have You Seen a Clock?. Stupid Question right! Let make a Clock and give a beautiful design of it. And we gonna give a beautiful background beside the clock.. 

MORE BLOGS AT:- https://darkwriter17.blogspot.com

Let Start The Program....


<!DOCTYPE html>
<html>
<head>
<title>analog clock</title>
<style>
.clock{
margin:0;
padding: 12px;
width: 520px;
height: 500px;
border-radius: 20%;
border-color: black;
border:0px;
border-style: double;
//background-color:HotPink;
margin-left: 35%; margin-top: 9%;
}
.time{
width: 50px;
height: 500px;
position: absolute;
transform-origin: 0%,100%;
margin-left:230px;
//border:1px solid;
font-family: LUCIDA HANDWRITING;
font-weight: bold;
color:yellow ;


}
#one{
transform: rotate(30deg);
}
#two{
transform: rotate(60deg);
}
#three{
transform: rotate(90deg);
}
#four{
transform: rotate(120deg);
}
#five{
transform: rotate(150deg);
}
#six{
transform: rotate(180deg);
}
#seven{
transform: rotate(210deg);
}
#eight{
transform: rotate(240deg);
}
#nine{
transform: rotate(270deg);
}
#ten{
transform: rotate(300deg);
}
#eleven{
transform: rotate(330deg);
}
#twelve{
transform: rotate(360deg);
}
.sui{
width:2px;
height: 250px;
position: absolute;
border:1px solid black;
background-color: black;
transform-origin:50% 100%;
margin-left: 250px;

}

#hour{
width:4px;
height:160px;
margin-top: 90px;
border-color: white;
animation: hour 216000s linear infinite;
}

@keyframes hour{
to{transform: rotate(360deg);}
}

#minute{
width:6px;
height:200px;
margin-top: 50px;
border-color: white;
animation: minute 3600s linear infinite;
}
@keyframes minute{
to{transform: rotate(360deg);}
}
#second{
width:0px;
height:220px;
margin-top: 30px;
border-color: deeppink;
animation: second 60s linear infinite;
}
@keyframes second{
to{transform: rotate(360deg);}
}
p{
position: absolute;
left:48%;
bottom:25%;
font-family: Vivaldi;
font-size:4em;
}

img{
min-width:100%;
min-height:100%;
position:absolute;
right: 0;
bottom: 0;
margin:0;
padding: 0;
}


</style>
</head>
<body>

<div class="clock">
<img src="file:///C:/Users/malhotra/Downloads/electricity-3442835_1920.jpg">
<div  class="time" id="one"><span style="display:inline-block;transform:rotate(-30deg);">I</span></div>
<div  class="time" id="two"><span style="display:inline-block;transform:rotate(-60deg);">II</span></div>
<div  class="time" id="three"><span style="display:inline-block;transform:rotate(-90deg);">III</span></div>
<div  class="time" id="four"><span style="display:inline-block;transform:rotate(-120deg);">IV</span></div>
<div  class="time" id="five"><span style="display:inline-block;transform:rotate(-150deg);">V</span></div>
<div  class="time" id="six"><span style="display:inline-block;transform:rotate(-180deg);">VI</span></div>
<div  class="time" id="seven"><span style="display:inline-block;transform:rotate(-210deg);">VII</span></div>
<div  class="time" id="eight"><span style="display:inline-block;transform:rotate(-240deg);">VIII</span></div>
<div  class="time" id="nine"><span style="display:inline-block;transform:rotate(-270deg);">IX</span></div>
<div  class="time" id="ten"><span style="display:inline-block;transform:rotate(-300deg);">X</span></div>
<div  class="time" id="eleven"><span style="display:inline-block;transform:rotate(-330deg);">XI</span></div>
<div  class="time" id="twelve"><span style="display:inline-block;transform:rotate(-360deg);">XII</span></div>

<div class="sui" id="hour"></div>
<div class="sui" id="minute"></div>
<div  class="sui" id="second"></div>
</div>
</body>
</html>


OUTPUT


Comments

Popular posts from this blog

DATABASE ::: TREE TRAVERSAL

Simple Degin Using HTML And CSS Part-2

Front End Processor