Files
BroCodeJS/MiniProjects/StopWatch/watch.html
2024-10-10 19:02:07 +02:00

63 lines
2.0 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>StopWatch</title>
</head>
<style>
.container {
margin: 20% auto;
width: 40%;
border-radius: 15px;
border: 2px solid black;
background-color: lightblue;
align-content: center;
min-width: fit-content;
}
.title{
text-align: center;
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
margin: 20px;
}
#time {
letter-spacing: 1ch;
font-size: 5ch;
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
text-align: center;
margin: 0;
background-color: rgb(184, 202, 221);
border-radius: 15px;
width: fit-content;
margin: auto;
}
.button-holder {
text-align: center;
}
.button{
padding: 10px;
margin: 10px;
width: 120px;
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
border-radius: 15px;
cursor: pointer;
font-size: 2ch;
font-weight: bold;
}
.button:hover {
background-color: rgb(184, 202, 221);
}
</style>
<body>
<div class="container">
<h1 class="title">StopWatch</h1>
<h1 id="time">00:00:00</h1>
<div class="button-holder">
<input class="button" style="background-color: green;" type="button" value="Start" onclick="start()">
<input class="button" style="background-color:red;" type="button" value="Stop" onclick="stop()">
<input class="button" style="background-color: royalblue;" type="button" value="Reset" onclick="reset()">
</div>
</div>
<script src="watch.js"></script>
</body>
</html>