@iamawesome10901/

css page transitions

HTML, CSS, JS

No description

fork
loading
Files
  • index.html
  • script.js
  • style.css
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
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>repl.it</title>
    <link href="style.css" rel="stylesheet" type="text/css" />
  </head>
  <body>
    <script src="script.js"></script>
    <nav>Navigation<a href="#1id">1</a><a href="#2id">2</a><a href="#3id">3</a><a href="#4id">4</a><a href="#5id">5</a></nav>
    <div class="page">
      <a id="1id"></a>
      <h1>Heading 1</h1>
    </div>
    <div class="page">
      <a id="2id"></a>
      <h1>Heading 2</h1>
    </div>
    <div class="page">
      <a id="3id"></a>
      <h1>Heading 3</h1>
    </div>
    <div class="page">
      <a id="4id"></a>
      <h1>Heading 4</h1>
    </div>
    <div class="page">
      <a id="5id"></a>
      <h1>Heading 5</h1>
    </div>
  </body>
</html>
result
console