Skip to content

Commit fe33273

Browse files
authored
Add files via upload
1 parent 224c8cd commit fe33273

3 files changed

Lines changed: 55 additions & 0 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
<title>Click Counter Button</title>
7+
<link rel="stylesheet" href="style.css">
8+
</head>
9+
<body>
10+
<div class="container">
11+
<h1 id="heading">Counter: 0</h1>
12+
<button id="button">Click here to Increase the Counter</button>
13+
</div>
14+
15+
<script src="script.js"></script>
16+
</body>
17+
</html>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const heading = document.getElementById("heading");
2+
const button = document.getElementById("button");
3+
4+
let count = 0;
5+
6+
button.addEventListener("click", () => {
7+
count++;
8+
heading.textContent = `Counter: ${count}`;
9+
})
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
body {
2+
padding: 200px;
3+
text-align: center;
4+
background: linear-gradient(to right, #654754, #647284);
5+
}
6+
7+
.container {
8+
background-color: white;
9+
border: none;
10+
border-radius: 50px;
11+
width: 25%;
12+
margin: auto;
13+
padding: 30px 80px 50px 80px;
14+
}
15+
16+
button {
17+
font-size: 15px;
18+
padding: 10px 20px;
19+
border: none;
20+
border-radius: 10px;
21+
color: white;
22+
background-color: cornflowerblue;
23+
font-weight: 600;
24+
cursor: pointer;
25+
}
26+
27+
button:hover {
28+
background-color: rgb(45, 102, 207);
29+
}

0 commit comments

Comments
 (0)