-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon-sub.js
66 lines (57 loc) · 1.7 KB
/
common-sub.js
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
console.log("Initialize");
function changeColorToB() {
textElement.style.color = 'black';
}
function changeColorToY() {
textElement.style.color = 'yellow';
}
function changeColorToR() {
textElement.style.color = 'red';
}
function changeColorToBL() {
textElement.style.color = 'blue';
}
function changeColorToA() {
textElement.style.color = 'aqua';
}
function changeColorToW() {
textElement.style.color = 'white';
}
let h=document.querySelector(".head");
let i=document.querySelector(".intr");
let d=document.querySelector(".des");
let s=document.querySelector(".start");
h.addEventListener('mouseover', function(){
h.style.color = 'purple';
});
h.addEventListener('mouseout',function(){
h.style.color='white';
});
i.addEventListener('mouseover', function(){
i.style.color = 'green';
});
i.addEventListener('mouseout',function(){
i.style.color='white';
});
d.addEventListener('mouseover', function(){
d.style.color = 'yellow';
});
d.addEventListener('mouseout',function(){
d.style.color='white';
});
s.addEventListener('mouseover', function(){
s.style.color = 'red';
});
s.addEventListener('mouseout',function(){
s.style.color='white';
});
document.querySelector(".sbut").addEventListener('mouseover', ()=>{
document.querySelector(".sbut").style.color='blue';
document.querySelector(".sbut").style.backgroundColor='yellow';
document.querySelector(".sbut").style.transform = 'translateZ(300px)';
})
document.querySelector(".sbut").addEventListener('mouseout', ()=>{
document.querySelector(".sbut").style.color='white';
document.querySelector(".sbut").style.backgroundColor='gray';
document.querySelector(".sbut").style.transform = 'translateZ(0px)';
})