-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjs.js
33 lines (30 loc) · 1013 Bytes
/
js.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
//// ( ) /////////
let image = document.getElementById('image') ;
let one = document.getElementById('one') ;
let two = document.getElementById('two') ;
let three3 = document.getElementById('three3') ;
let container = document.getElementById('container') ;
container.style.transition = 'all 1s ease';
two.addEventListener('click',function() {
//image.style.opacity='0.5';//
image.src=two.src;
container.style.backgroundColor = '#C0C0C0';
two.style.opacity='1'
three3.style.opacity='0.7';
one.style.opacity='0.7';
//C0C0C0//
})
three3.addEventListener('click',function() {
image.src=three3.src;
container.style.backgroundColor = '#000000';
three3.style.opacity='1'
two.style.opacity='0.7';
one.style.opacity='0.7';
})
one.addEventListener('click',function() {
image.src=one.src;
container.style.backgroundColor = '#3481c9';
one.style.opacity='1'
three3.style.opacity='0.7'
two.style.opacity='0.7'
})