Skip to content

Commit ec37d35

Browse files
committed
completed basic model of project
0 parents  commit ec37d35

File tree

3 files changed

+70
-0
lines changed

3 files changed

+70
-0
lines changed

Diff for: index.html

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<link rel="stylesheet" href="style.css">
7+
<title>Document</title>
8+
9+
</head>
10+
<body>
11+
<label id="counter">0</label>
12+
<br><br>
13+
<div id="btncontainer">
14+
<button id="decrease" class="btn">Decrese</button>
15+
<button id="reset" class="btn">Reset</button>
16+
<button id="increase" class="btn">Increase</button>
17+
18+
</div>
19+
20+
<script src="index.js"></script>
21+
</body>
22+
</html>

Diff for: index.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
3+
const decrease= document.getElementById("decrease");
4+
const reset= document.getElementById("reset");
5+
const increase= document.getElementById("increase");
6+
const counter= document.getElementById("counter");
7+
8+
let count=0;
9+
10+
decrease.onclick=function(){
11+
count--;
12+
counter.textContent=count;
13+
}
14+
reset.onclick=function(){
15+
count=0;
16+
counter.textContent=count;
17+
}
18+
increase.onclick=function(){
19+
count++;
20+
counter.textContent=count;
21+
}

Diff for: style.css

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#counter{
2+
font-size: 10rem;
3+
font-family: 'Times New Roman', Times, serif;
4+
text-align: center;
5+
display: block;
6+
}
7+
8+
#btncontainer{
9+
display: flex;
10+
text-align: center;
11+
justify-content: center;
12+
13+
}
14+
.btn{
15+
padding: 10px;
16+
margin: 20px;
17+
font-size: 4vh;
18+
color: cornflowerblue;
19+
background-color: black;
20+
cursor: pointer;
21+
border-radius: 10%;
22+
border: 10px bold blueviolet;
23+
24+
}
25+
.btn :hover{
26+
background-color: aquamarine;
27+
}

0 commit comments

Comments
 (0)