-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
42 lines (28 loc) · 1.08 KB
/
script.js
File metadata and controls
42 lines (28 loc) · 1.08 KB
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
const container= document.querySelector('.container');
const inputs= document.querySelectorAll('input');
const loginBtn= document.querySelector('#loginBtn');
const createBtn = document.getElementById('createBtn');
let hue =0;
function animateBorder(){
hue=(hue+1)%360;
const nextHue=(hue+60)%360;
container.style.borderImage = `linear-gradient(45deg, hsl(${hue},100%,50%), hsl(${nextHue},100%,50%) 1`;
requestAnimationFrame(animateBorder);
}
animateBorder();
createBtn.addEventListener("click",()=>{
window.location.href="signup.html";
});
// inputs.forEach(input=>{
// input.addeventlistner('focus',()=>{
// container.style.boxShadow = '0 0 30px 5px cyan';
// });
// input.addeventlistner('blur',()=>{
// container.style.boxShadow = '0 0 10px 2px purple';
// });
// });
// loginBtn.addEventListener('click',()=>{
// const randomHue = Math.floor(Math.random() * 360);
// container.style.borderImage = `linear-gradient(45deg, hsl(${randomHue},100%,50%), hsl(${(randomHue+60)%360},100%,50%)) 1`;
// alert('Login button clicked!');
// })