index.html 1.0 KB

123456789101112131415161718192021222324252627282930
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="chrome=1">
  6. <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
  7. <link rel="stylesheet" href="../resources/css/base.css" />
  8. <link rel="stylesheet" href="../common/css/style.css" />
  9. </head>
  10. <body>
  11. <div class="instructions">Resize the screen to see the tethered element stick to the edges of the screen when it's resized.</div>
  12. <div class="element"></div>
  13. <div class="target"></div>
  14. <script src="//github.hubspot.com/tether/dist/js/tether.js"></script>
  15. <script>
  16. new Tether({
  17. element: '.element',
  18. target: '.target',
  19. attachment: 'top left',
  20. targetAttachment: 'top right',
  21. constraints: [{
  22. to: 'window',
  23. pin: true
  24. }]
  25. });
  26. </script>
  27. </body>
  28. </html>