4

我想自动定位我的工具提示,就像我在浏览器滚动条的顶部一样,并且第一行有一个带有工具提示的链接,那么工具提示必须显示在底部中间。

有没有办法只使用angularjs?

我正在使用 angular-ui-bootstrap

<a href="#" tooltip-template="'tool.html'" tooltip-class="customclass">My template</a>
<style>
    .tooltip.customclass .tooltip-inner {
        color: #414141;
        background-color: #f1f1f1;
        box-shadow: 0 6px 12px rgba(0,0,0,.175);
    }
    .tooltip.customclass .tooltip-arrow {
        display: none;}
</style>
<script type="text/ng-template" id="tool.html">
    <span>Special Tooltip with <strong>markup</strong></span>
</script>`
4

1 回答 1

0

我们正在通过https://github.com/angular-ui/bootstrap/issues/375跟踪此问题,目前没有编码解决方案。但是,请随时订阅该问题以获取更新,并查看上述问题中的此链接以获取解决方法。

使用 Bootstrap 4 时,事情可能会变得更加棘手,因为它们添加了对 Tether 库的依赖。如果我们支持它,我们还有更多的研究要做,以确定这将如何影响我们的库大小。

于 2015-08-31T17:28:15.450 回答