ungleich-staticcms/assets/u/static/popper.js-1.16.0/packages/popper/tests/visual/test.html
Nico Schottelius 16fb2bb919 import popper.js
Signed-off-by: Nico Schottelius <nico@nico-notebook.schottelius.org>
2019-12-31 01:21:21 +01:00

44 lines
766 B
HTML

<!DOCTYPE html>
<html>
<head>
<style>
#ref {
background: orange;
width: 50px;
height: 50px;
}
#pop {
background: green;
width: 50px;
height: 50px;
}
.container {
align-items: center;
background: blue;
border: 20px solid red;
display: flex;
height: 400px;
justify-content: center;
margin: auto;
position: relative;
width: 400px;
}
</style>
</head>
<body>
<div class="container">
<div id="ref" aria-describedby="pop">ref</div>
<div id="pop" role="tooltip">pop</div>
</div>
<script src="../../dist/umd/popper.js"></script>
<script>
const refEl = document.getElementById("ref");
const popEl = document.getElementById("pop");
const popper = new Popper(refEl, popEl);
</script>
</body>
</html>