-
Notifications
You must be signed in to change notification settings - Fork 0
/
MyArtwork.html
76 lines (66 loc) · 2.25 KB
/
MyArtwork.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
74
75
76
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="shortcut icon" href="images/viber_image_2021-05-01_00-51-21.jpg" type="image/x-icon">
<meta name="description" content="Gallery page">
<meta name="keywords" content="Marija Gjorgjieva,Marija Gjondeva,Марија Ѓорѓиева,Марија Ѓондева">
<title>My Artwork</title>
<link rel="stylesheet" href="styles.css">
<script src="scroll.js"></script>
</head>
<body>
<div id="nav">
<div class="blank"></div>
<a id="topcee" href="index.html"><img src="images/rotatingBall.gif" alt="Home button" ></a>
<div class="blank"></div>
</div>
<div id="loader-wrapper">
<div id="loader"></div>
<div class="loader-section section-left"></div>
<div class="loader-section section-right"></div>
</div>
<div class="cursor"></div>
<div class="cursor2"></div>
<article class="galerija">
<div class="sliki">
<div id="slika1"></div>
<div id="slika2"></div>
<div id="slika3"></div>
<div id="slika4"></div>
</div>
</article>
</body>
<script>
var cursor = document.querySelector('.cursor');
var cursorinner = document.querySelector('.cursor2');
var a = document.querySelectorAll('a');
document.addEventListener('mousemove', function(e){
var x = e.clientX;
var y = e.clientY;
cursor.style.transform = `translate3d(calc(${e.clientX}px - 50%), calc(${e.clientY}px - 50%), 0)`
});
document.addEventListener('mousemove', function(e){
var x = e.clientX;
var y = e.clientY;
cursorinner.style.left = x + 'px';
cursorinner.style.top = y + 'px';
});
document.addEventListener('mousedown', function(){
cursor.classList.add('click');
cursorinner.classList.add('cursorinnerhover')
});
document.addEventListener('mouseup', function(){
cursor.classList.remove('click')
cursorinner.classList.remove('cursorinnerhover')
});
a.forEach(item => {
item.addEventListener('mouseover', () => {
cursor.classList.add('hover');
});
item.addEventListener('mouseleave', () => {
cursor.classList.remove('hover');
});
})
</script>
</html>