Skip to content

Instantly share code, notes, and snippets.

@stanwmusic
Created March 7, 2017 00:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stanwmusic/1eb25e3006fd28e48db62b31ded2cd38 to your computer and use it in GitHub Desktop.
Save stanwmusic/1eb25e3006fd28e48db62b31ded2cd38 to your computer and use it in GitHub Desktop.
Digital clock, Time Js
<h1 id="tx"></h1>
<p id="title"></p>
<!-- Font Google: Bungee-->
<link href="https://goo.gl/2MruR3" rel="stylesheet">
<!-- More:goo.gl/Nu59P6-->
title.innerHTML="Time Js";
// For time
function time() {
var d = new Date();
document.getElementById("tx").innerHTML = d.toLocaleTimeString();
}
setInterval(time, 1000);
body{
max-width: 960px;
background: #17202A;
margin: auto;
padding: 2% 1%;
text-align: center;
font-family: 'Bungee', cursive;
color: #fff;
}
h1{
padding: 2% 1%;
margin: auto;
letter-spacing: 9px;
font-size: 190px;
color: #F975F7;
text-shadow: 0px 1px 0px #c7c8ca, 0px 2px 0px #b1b3b6, 0px 3px 0px #9d9fa2, 0px 4px 0px #8a8c8e, 0px 5px 0px #77787b, 0px 6px 0px #636466, 0px 7px 0px #4d4d4f, 0px 8px 7px #001135;
filter: drop-shadow(2px 2px 20px #f008b7);
}
/*Responsive*/
@media (max-width: 425px) {
h1{font-size:300%;}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment