Нет описания

offset-parent-2.html 903B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <!DOCTYPE html> <title>Basic Visual Test</title>
  2. <style>
  3. @import '/reset.css';
  4. html,
  5. body {
  6. height: 1500px;
  7. }
  8. #reference {
  9. width: 200px;
  10. height: 200px;
  11. background-color: red;
  12. box-shadow: inset 0 0 0 1px black;
  13. }
  14. #popper {
  15. width: 100px;
  16. height: 100px;
  17. background-color: rebeccapurple;
  18. box-shadow: inset 0 0 0 1px black;
  19. }
  20. table {
  21. margin-top: 100px;
  22. }
  23. th {
  24. position: relative;
  25. }
  26. </style>
  27. <table>
  28. <tbody>
  29. <tr>
  30. <th>
  31. <div id="reference">Reference</div>
  32. <div id="popper">Popper</div>
  33. </th>
  34. </tr>
  35. </tbody>
  36. </table>
  37. <script type="module">
  38. import { createPopper } from '../dist/popper.js';
  39. const reference = document.querySelector('#reference');
  40. const popper = document.querySelector('#popper');
  41. window.instance = createPopper(reference, popper, {
  42. placement: 'right',
  43. });
  44. </script>