-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCreateCircle.html
More file actions
40 lines (37 loc) · 1 KB
/
CreateCircle.html
File metadata and controls
40 lines (37 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Circle Creation Button</title>
<style>
body {
transition: background-color 0.5s ease;
text-align: center;
}
button {
padding: 10px;
font-size: 16px;
cursor: pointer;
}
.circle {
width: 100px;
height: 100px;
border-radius: 50%;
margin: 20px auto;
}
</style>
</head>
<body>
<button id="btn">Create Circle</button>
<div id="circleContainer"></div>
<script>
document.querySelector('#btn').addEventListener('click',function(e){
const circle=document.createElement("div");
circle.className="circle";
circle.style.backgroundColor="blue";
document.getElementById("circleContainer").appendChild(circle);
})
</script>
</body>
</html>