Skip to content

Commit

Permalink
third js project
Browse files Browse the repository at this point in the history
  • Loading branch information
AryanMittal11 committed Jul 26, 2024
1 parent f5cb020 commit 19fbf0e
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Digital Clock/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link rel="stylesheet" href="style.css" />
<title>Your Local Time</title>
</head>
<body>
<div class="center">
<div id="banner"><span>Your local time</span></div>
<div id="clock"></div>
</div>
<script src="script.js"></script>
</body>
</html>
5 changes: 5 additions & 0 deletions Digital Clock/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const clock = document.querySelector("#clock")

setInterval(function(){
clock.innerHTML = new Date().toLocaleTimeString()
}, 1000)
18 changes: 18 additions & 0 deletions Digital Clock/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
body {
background-color: #212121;
color: #fff;
}
.center {
display: flex;
height: 100vh;
justify-content: center;
align-items: center;
flex-direction: column;
}
#clock {
font-size: 40px;
background-color: orange;
padding: 20px 50px;
margin-top: 10px;
border-radius: 10px;
}

0 comments on commit 19fbf0e

Please sign in to comment.