问题描述
一个 HTML 页面包含 2 个 SVG 形状,每个形状都有一个工具提示(使用 Tippy 创建)。
如何让工具提示出现在页面中的相同位置(假设在下方的红色矩形中 - 页面右侧)?
tippy('#circle_1',{
content: `That's a circle !`,arrow: false,});
tippy('#rect_1',{
content: 'Here is a rectangle !',});
<script src="https://unpkg.com/@popperjs/core@2"></script>
<script src="https://unpkg.com/tippy.js@6"></script>
<svg width="250" height="250">
<circle id="circle_1" cx="30" cy="45" r="25" />
<rect id="rect_1" x="80" y="25" width="60" height="40" />
<rect id="placeholder" x=150 y=25 width="100" height="50" fill-opacity="0" stroke="red" stroke-width="1" />
</svg>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)