-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
131 lines (114 loc) · 3.19 KB
/
index.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
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Scroll-to-Elements Example</title>
<link rel="icon" type="image/x-icon" href="https://avatars.githubusercontent.com/u/115075582?v=4">
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
padding: 0;
height: 150vh;
background-color: #f4f4f4;
}
section {
margin-bottom: 500px;
border: 1px solid #ccc;
padding: 20px;
background-color: #fff;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
margin-top: 20px;
}
img {
max-width: 100%;
height: auto;
display: block;
margin: 0 auto;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
margin-top: 15px;
}
nav {
background-color: #333;
padding: 10px;
color: white;
}
nav ul {
list-style-type: none;
padding: 0;
margin: 0;
}
nav li {
display: inline;
margin-right: 20px;
}
nav a {
color: white;
text-decoration: none;
font-weight: bold;
font-size: 16px;
transition: color 0.3s; /* Smooth transition for color change during hover */
}
a {
color: #333;
text-decoration: none;
}
a:hover {
color: #ff7f50; /* Change the color during hover state */
}
h1 {
color: #333;
text-align: center;
}
button, a {
display: block;
margin: 20px 0;
padding: 10px;
background-color: #333;
color: white;
border: none;
cursor: pointer;
text-align: center;
text-decoration: none;
border-radius: 5px;
transition: background-color 0.3s;
}
button:hover, a:hover {
background-color: #555;
}
</style>
</head>
<body>
<h1>Welcome to My Scroll-to-Elements Example</h1>
<nav>
<ul>
<li><a href="#section1">Section 1</a></li>
<li><a href="#section2">Section 2</a></li>
<li><a href="#section3">Section 3</a></li>
</ul>
</nav>
<section id="section1">
<h2>Section 1</h2>
<p>This is the first section of your project.</p>
<a href="#section3"> Go to Bottom</a>
</section>
<section id="section2">
<h2>Section 2</h2>
<p>This is the second section of your project.</p>
<img src="https://via.placeholder.com/300" alt="Placeholder Image">
<a href="#section1">Back to Top</a>
</section>
<section id="section3">
<h2>Section 3</h2>
<p>This is the third section of your project.</p>
<a href="#section1">Back to Top</a>
</section>
<a href="#section1">Back to Top</a>
<script src="./dist/app.js">
</script>
</body>
</html>