| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <!DOCTYPE html> <title>Basic Visual Test</title>
- <style>
- @import '/reset.css';
- #scroll {
- position: relative;
- overflow: scroll;
- width: 300px;
- height: 300px;
- background-color: grey;
- }
- #scroll::before {
- content: 'before';
- display: block;
- height: 300px;
- width: 1px;
- }
- #scroll::after {
- content: 'after';
- display: block;
- height: 300px;
- width: 1px;
- }
- #reference {
- width: 200px;
- height: 200px;
- background-color: red;
- box-shadow: inset 0 0 0 1px black;
- }
- #popper {
- width: 100px;
- height: 100px;
- background-color: rebeccapurple;
- box-shadow: inset 0 0 0 1px black;
- }
- </style>
- <div id="scroll">
- <div id="reference">Reference Box</div>
- </div>
- <div id="popper">Popper Box</div>
- <script type="module">
- import { createPopper } from '../dist/popper.js';
- const reference = document.querySelector('#reference');
- const popper = document.querySelector('#popper');
- window.instance = createPopper(reference, popper, {
- placement: 'right',
- strategy: 'fixed',
- });
- </script>
|