如何将引导工具提示放在angularjs中的SVG元素上 [英] How to put bootstrap tooltip over SVG elements in angularjs

查看:86
本文介绍了如何将引导工具提示放在angularjs中的SVG元素上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想尝试将引导工具提示放在angularjs中的svg元素上,我没有使用d3.js,我只是使用了angularjs.如果您通过示例给出说明,那将是更好的选择.

I want try to put bootstrap tooltip over svg element in angularjs, I am not using d3.js, I simply using angularjs. If you give explanation with example that would be preferable.

推荐答案

诀窍是将其附加到主体而不是父元素.

The trick is just to append it to the body instead of the parent element.

我在此处创建了一个带有

I created here an example with UI Bootstrap angular directives.

<svg>
    <circle cx="60" cy="60" r="50" tooltip="Hello world" 
        tooltip-append-to-body="true" tooltip-placement="right"/>
</svg>

这篇关于如何将引导工具提示放在angularjs中的SVG元素上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆