-
Notifications
You must be signed in to change notification settings - Fork 2
/
2.js
25 lines (18 loc) · 844 Bytes
/
2.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
document.addEventListener("DOMContentLoaded", () => {
const scrollContainer = document.getElementById('scrollContainer');
const emptySpace = document.createElement('div');
emptySpace.style.height = '2000px'; // Set this to the desired scrollable height
scrollContainer.appendChild(emptySpace);
document.body.style.overflow = 'auto';
});
window.addEventListener('load', () => {
const gradientDiv = document.getElementById('gradientBackground');
// Example function to change gradient dynamically
function changeGradient(color1, color2) {
gradientDiv.style.background = `linear-gradient(${color1}, ${color2})`;
}
// Change the gradient after 3 seconds for demonstration
setTimeout(() => {
changeGradient('darkblue', 'black');
}, 3000);
});