summaryrefslogtreecommitdiffstats
path: root/afm-client/bower_components/tether/examples/content-visible/index.html
blob: 94e2176b565496e4eaf6a36d7d153efc17cc8cfe (plain)
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
<!DOCTYPE html>
<html>
    <head>
        <link rel="stylesheet" href="../resources/css/base.css" />
    </head>
    <body>

    <div class="instructions">Scroll the page</div>

    <style>
      .instructions {
        width: 100%;
        text-align: center;
        font-size: 24px;
        padding: 15px;
        background-color: rgba(210, 180, 140, 0.4);
      }

      * {
        box-sizing: border-box;
      }
      body {
        min-height: 1200vh;
        height: 100%;
      }

      .content-box {
        width: 600px;
        border: 10px solid #999;
        height: 600vh;
        background-color: #439CCC;
        margin: 200vh auto;
      }
      .element {
        border: 10px solid #999;
        background-color: #FFDC00;
        width: 300px;
        height: 200px;
        padding: 0 15px;
        font-size: 20px;
        font-weight: bold;
      }
    </style>

    <div class="content-box">
      <div class="element">
        <p>This is some sort of crazy dialog.</p>

        <p>It's setup to align with the center of the visible part of the blue area.</p>
      </div>
    </div>

    <script src="../../tether.js"></script>
    <script>
      new Tether({
        element: '.element',
        target: '.content-box',
        attachment: 'middle center',
        targetAttachment: 'middle center',
        targetModifier: 'visible'
      });
    </script>
  </body>
</html>