-
Notifications
You must be signed in to change notification settings - Fork 0
/
index2.html
60 lines (53 loc) · 1.91 KB
/
index2.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI Rebel</title>
<link rel="stylesheet" href="css/styles.css">
</head>
<body>
<div class="intro">
<h1>Welcome to AI Rebel</h1>
<p>Start scrolling</p>
</div>
<div class="section" id="section1">
<div class="content">
<h2>What is AI Rebel?</h2>
<p>
"AI Rebel" represents the next frontier in artificial intelligence—a system designed to challenge and push the boundaries of conventional AI thinking.
</p>
</div>
</div>
<div class="section" id="section2">
<div class="content">
<h2>Features of AI Rebel</h2>
<p>
Unlike traditional AI, which follows strict rules and patterns, AI Rebel dares to think outside the box, embracing creativity, unpredictability, and innovation.
</p>
<img src="img/ai-rebel2.jpg" alt="AI Features Image" class="ai-image">
</div>
</div>
<script>
document.addEventListener('scroll', function () {
const intro = document.querySelector('.intro');
const sections = document.querySelectorAll('.section');
const scrollPos = window.scrollY;
// Fade out the intro section
if (scrollPos > 100) {
intro.style.opacity = 1 - scrollPos / 300;
} else {
intro.style.opacity = 1;
}
// Reveal sections as you scroll
sections.forEach(section => {
if (scrollPos + window.innerHeight > section.offsetTop + 100) {
section.classList.add('active');
} else {
section.classList.remove('active');
}
});
});
</script>
</body>
</html>