-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
73 lines (59 loc) · 1.87 KB
/
index.html
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mouse Clicker</title>
</head>
<body>
<style>
body {
margin: 0;
padding: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
background: url('https://images.unsplash.com/photo-1536183922588-166604504d5e?w=600&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MzF8fGRpenp5JTIwZGFya3xlbnwwfHwwfHx8MA%3D%3D') no-repeat center center;
background-size: cover;
font-family: Arial, sans-serif;
}
.container {
position: relative;
width: 100%;
height: 100%;
}
.follower {
position: absolute;
top: 0;
left: 0;
width: 70px;
height: 70px;
/* background-color: rgba(255, 255, 255, 0.8); */
background: url('https://upload.wikimedia.org/wikipedia/commons/thumb/e/ee/Weather_icon_-_full_moon.svg/1200px-Weather_icon_-_full_moon.svg.png') no-repeat center center;
background-size: cover;
border-radius: 50%;
box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
pointer-events: none;
transition: transform 0.05s ease-out, background-color 0.3s ease;
}
.follower:hover {
background-color: rgba(255, 255, 255, 1);
}
</style>
</head>
<body>
<div class="container">
<div class="follower" id="follower"> </div>
</div>
<script>
const follower = document.getElementById("follower");
document.addEventListener("mousemove", (event) => {
let { clientX, clientY } = event;
console.log(event);
follower.style.transform = `translate(${clientX}px,${clientY}px)`;
});
</script>
</body>
</html>