|
@@ -0,0 +1,31 @@
|
|
1
|
+<script type="text/javascript">
|
|
2
|
+ document.onmousemove = suitsouris;
|
|
3
|
+ function suitsouris(evenement)
|
|
4
|
+ {
|
|
5
|
+ if(navigator.appName=="Microsoft Internet Explorer")
|
|
6
|
+ {
|
|
7
|
+ var x = event.x+document.body.scrollLeft;
|
|
8
|
+ var y = event.y+document.body.scrollTop;
|
|
9
|
+ }
|
|
10
|
+ else
|
|
11
|
+ {
|
|
12
|
+ var x = evenement.pageX;
|
|
13
|
+ var y = evenement.pageY;
|
|
14
|
+ }
|
|
15
|
+ document.getElementById("image_suit_souris").style.left = (x+1/*+1-43*/)+'px';
|
|
16
|
+ document.getElementById("image_suit_souris").style.top = (y+1/*-17*/)+'px';
|
|
17
|
+ }
|
|
18
|
+</script>
|
|
19
|
+
|
|
20
|
+<style>
|
|
21
|
+.cursor {
|
|
22
|
+ position: absolute;
|
|
23
|
+ display: block;
|
|
24
|
+ z-index: 5;
|
|
25
|
+ width: 75px;
|
|
26
|
+ transform: translateX(-22px) translateY(-106px);
|
|
27
|
+ pointer-events: none;
|
|
28
|
+}
|
|
29
|
+</style>
|
|
30
|
+
|
|
31
|
+<img src="assets/img/cursor.png" alt="Image qui suit la souris" id="image_suit_souris" class="cursor" />
|