-
Notifications
You must be signed in to change notification settings - Fork 9
/
target_pointer.css
72 lines (68 loc) · 2.01 KB
/
target_pointer.css
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
body {
margin: 0;
height: 100vh;
display: flex;
background:
linear-gradient(#223333 66%, #112222);
}
.magnetic-cursor {
position: fixed;
width: 52px;
height: 52px;
margin-left: -26px;
margin-top: -26px;
z-index: 9999;
pointer-events: none;
background:
linear-gradient(to right, gray 1px, transparent 1px) 0 0,
linear-gradient(to right, gray 1px, transparent 1px) 0 100%,
linear-gradient(to left, gray 1px, transparent 1px) 100% 0,
linear-gradient(to left, gray 1px, transparent 1px) 100% 100%,
linear-gradient(to bottom, gray 1px, transparent 1px) 0 0,
linear-gradient(to bottom, gray 1px, transparent 1px) 100% 0,
linear-gradient(to top, gray 1px, transparent 1px) 0 100%,
linear-gradient(to top, gray 1px, transparent 1px) 100% 100%;
background-size: 4px 4px;
background-repeat: no-repeat;
}
.magnetic-cursor.locked {
width: 24px;
height: 24px;
margin-left: -12px;
margin-top: -12px;
transition-property: background, width, height, margin;
transition-duration: .1s;
background:
linear-gradient(to right, orange 2px, transparent 2px) 0 0,
linear-gradient(to right, orange 2px, transparent 2px) 0 100%,
linear-gradient(to left, orange 2px, transparent 2px) 100% 0,
linear-gradient(to left, orange 2px, transparent 2px) 100% 100%,
linear-gradient(to bottom, orange 2px, transparent 2px) 0 0,
linear-gradient(to bottom, orange 2px, transparent 2px) 100% 0,
linear-gradient(to top, orange 2px, transparent 2px) 0 100%,
linear-gradient(to top, orange 2px, transparent 2px) 100% 100%;
background-size: 4px 4px;
background-repeat: no-repeat;
}
.item-container {
width: 400px;
color: white;
margin: auto;
display: flex;
flex-direction: row;
gap: 4px;
}
.item-container .cursor-attractor {
width: 36px;
height: 36px;
border: 1px solid white;
cursor: pointer;
display: flex;
}
.item-container .cursor-attractor div {
margin: auto;
text-align: center;
}
.item-container .cursor-attractor:hover div {
color: orange;
}