-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
88 lines (77 loc) · 1.59 KB
/
styles.css
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
color: #333;
}
.nav-bar {
display: flex;
justify-content: flex-end;
padding: 10px;
background-color: #1f1f1f;
}
.menu-icon {
font-size: 30px;
color: white;
cursor: pointer;
display: inline-block;
padding: 10px;
}
#nav-links {
list-style: none;
display: flex;
gap: 20px;
margin-right: 20px;
}
#nav-links a {
text-decoration: none;
color: white;
font-size: 18px;
padding: 10px;
transition: 0.3s;
}
#nav-links a:hover {
background-color: #007BFF;
color: white;
}
.hidden {
display: none;
}
/* Make the nav responsive */
@media only screen and (max-width: 600px) {
#nav-links {
flex-direction: column;
position: absolute;
right: 0;
top: 50px;
background-color: #333;
width: 200px;
}
}
body {
background-image: url('your-background-image.jpg');
background-size: cover;
background-position: center;
color: white;
}
h1, h2, p {
color: white;
}
/* Fade-in animation for sections */
section {
opacity: 0;
transform: translateY(20px);
transition: opacity 0.5s ease, transform 0.5s ease;
}
section.visible {
opacity: 1;
transform: translateY(0);
}
window.addEventListener("scroll", function () {
let sections = document.querySelectorAll("section");
sections.forEach(function (section) {
let position = section.getBoundingClientRect();
if (position.top < window.innerHeight) {
section.classList.add("visible");
}
});
});