Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
April 2, 2024 07:39 am GMT

How to make a clock using html , JavaScript and CSS and deploy it using firebase


<div class="container"><div id="clock"></div></div>


margin: 0px;
padding: 0px;

width: 100vw;
height: 100vh;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
background-color: rgb(67, 66, 66);


font-size: 5vw;font-family: orbitron;background-color: rgb(16, 16, 16);border: 1vw solid black;color: green;width: 30vw;height: 20vh;display: flex;align-items: center;justify-content: center;

@media(max-width:800px)and (orientation:portrait){
width: 98vw;
height: 25vh;
font-size: 18vw;

@media(max-width:786px)and (orientation:landscape){
width: 98vw;
height: 50vh;
font-size: 18vw;


` function Clock(){
let d= new Date();
hours = d.getHours()
minutes = d.getMinutes()
seconds = d.getSeconds()
document.getElementById('clock').innerText = hours + ':' + minutes + ':' + seconds;



Original Link:

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To