1.0.2 • Published 4 years ago

digital-clock v1.0.2

Weekly downloads
6
License
MIT
Repository
github
Last release
4 years ago

Digital Clock

USE THIS AWESOME DIGITAL CLOCK FOR YOUR WEBSITE THAT CHANGE DEPENDING ON WHAT TIME ZONE YOU/YOUR USER IS IN.

Install

npm i digital-clock

HTML

<div class="digital-clock"></div> 
<script src="index.js" type="module"></script>

CSS

.digital-clock { 
    font-size: 3em; /*To change the size of the numbers*/
    max-width: 250px;  /*To change the widt of the clock*/
    text-align: center; 
    border: 2px solid black; /*To change the border around the clock*/
    border-radius: 20px; /*To change how round the edges are*/
    background-color: white; /*To change the background color of the clock*/
}

Javascript

import showTime from "./node_modules/digital-clock/index.js";
 
setInterval(showTime, 1000);