-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
45 lines (35 loc) · 1.6 KB
/
index.html
File metadata and controls
45 lines (35 loc) · 1.6 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
43
44
45
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dynamic Style Switcher</title>
<link rel="stylesheet" href="theme.css">
<link rel="stylesheet" href="styles.css">
<script src="script.js" defer></script>
</head>
<body>
<!-- HTML - Already complete for students -->
<main>
<h1>Dynamic Style Switcher</h1>
<p>This page demonstrates how JavaScript can dynamically change styles in response to user interactions. Click
the button below to see both immediate and delayed style changes in action.</p>
<h2>What You'll See:</h2>
<div class="feature-list">
<ul>
<li>Immediate background and text color changes</li>
<li>Instant padding and border radius adjustments</li>
<li>A delayed font size change after 2 seconds</li>
<li>Smooth transitions between all style states</li>
</ul>
</div>
<button id="themeButton">Switch Theme</button>
<p>This type of dynamic styling is commonly used in modern web applications for features like dark mode toggles,
interactive dashboards, and user interface customization options.</p>
<h2>Technical Implementation</h2>
<p>The functionality combines immediate DOM manipulation with timed updates using JavaScript event listeners and
the setTimeout function. This approach creates a layered user experience that feels both responsive and
polished.</p>
</main>
</body>
</html>