-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathevent4.html
More file actions
41 lines (39 loc) · 1.12 KB
/
Copy pathevent4.html
File metadata and controls
41 lines (39 loc) · 1.12 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
41
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
*{
margin: 0;
padding: 0;
font-family: Arial, Helvetica, sans-serif;
box-sizing: border-box;
}
html,body{
width: 100%;
height: 100%;
}
body{
/* we shouldnt apply these settings on our body directly, but we should do this on our main div actually */
position: relative;
overflow: hidden;
}
#abcd{
position: absolute;/* because of this only the card moves. */
/* with the help of transition we can delay the card movement according to our mouse to give an aesthetic effect */
transition: all cubic-bezier(0.19, 1, 0.22, 1) 0.5s;
width: 50px;
height: 50px;
background-color: red;
border-radius: 50%;
}
</style>
</head>
<body>
<div id="abcd">
</div>
<script src="event4.js"></script>
</body>
</html>