Нема описа

nested-alt.html 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <!DOCTYPE html> <title>Basic Visual Test</title>
  2. <style>
  3. @import '/reset.css';
  4. .scroll {
  5. overflow: scroll;
  6. width: 300px;
  7. height: 300px;
  8. background-color: grey;
  9. }
  10. .scroll2 {
  11. width: 600px;
  12. height: 600px;
  13. background-color: darkgrey;
  14. }
  15. .scroll::before {
  16. content: 'before';
  17. display: block;
  18. height: 300px;
  19. width: 1px;
  20. }
  21. .scroll::after {
  22. content: 'after';
  23. display: block;
  24. height: 300px;
  25. width: 1px;
  26. }
  27. #reference {
  28. width: 200px;
  29. height: 200px;
  30. background-color: red;
  31. box-shadow: inset 0 0 0 1px black;
  32. }
  33. #popper {
  34. width: 100px;
  35. height: 100px;
  36. background-color: rebeccapurple;
  37. box-shadow: inset 0 0 0 1px black;
  38. }
  39. </style>
  40. <div class="scroll scroll2">
  41. <div class="scroll scroll1"><div id="popper">Popper Box</div></div>
  42. <div id="reference">Reference Box</div>
  43. </div>
  44. <script type="module">
  45. import { createPopper } from '../dist/popper.js';
  46. const reference = document.querySelector('#reference');
  47. const popper = document.querySelector('#popper');
  48. window.instance = createPopper(reference, popper, {
  49. placement: 'right',
  50. });
  51. </script>