ungleich-staticcms/assets/u/static/popper.js-1.16.0/packages/popper/tests/visual/tooltip.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

29 lines
634 B
HTML

<!DOCTYPE html>
<title>Tooltip.js test page</title>
<script src="../../dist/popper.js"></script>
<script src="../../dist/tooltip.js"></script>
<style>
body {
min-height: 100vh;
margin: 0;
}
.reference {
background: yellow;
width: 200px;
}
.tooltip {
color: white;
background: black;
border-radius: 2px;
display: inline-block;
}
</style>
<div class="reference" title="Tooltip text">Reference element</div>
<script>
new Tooltip(
document.querySelector(".reference"),
{ placement: "bottom", trigger: "click" }
);
</script>