Aucune description

checkVariation.html 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. position: absolute;
  10. top: 150px;
  11. left: 50px;
  12. width: 200px;
  13. height: 200px;
  14. background-color: red;
  15. box-shadow: inset 0 0 0 1px black;
  16. }
  17. #popper {
  18. width: 500px;
  19. height: 100px;
  20. background-color: rebeccapurple;
  21. box-shadow: inset 0 0 0 1px black;
  22. }
  23. </style>
  24. <div id="reference">Reference Box</div>
  25. <div id="popper">Popper Box</div>
  26. <script type="module">
  27. import { createPopper } from '../../dist/popper.js';
  28. const reference = document.querySelector('#reference');
  29. const popper = document.querySelector('#popper');
  30. window.instance = createPopper(reference, popper, {
  31. placement: 'top-end',
  32. modifiers: [
  33. {
  34. name: 'flip',
  35. options: {
  36. fallbackPlacements: [
  37. 'top-start',
  38. 'right-start',
  39. 'right-end',
  40. 'bottom-end',
  41. 'bottom-start',
  42. ],
  43. },
  44. },
  45. ],
  46. });
  47. </script>