Angular中的ngbTooltip不在项目的中心

时间:2017-09-08 14:12:51

标签: html css ng-bootstrap

有谁知道为什么工具提示不在项目的中心(中间顶部)?

这是图片......你可以在顶部中心右侧看到它更多一点

item

和其他项目一样..这里会更容易看到

item 2

这是我的HTML代码:

<button class="btn btn-icon coverage-item "
        type="button"
        placement="top"
        ngbTooltip="Incendio">
  <img src="/assets/img/coverages/icon_thunderbolt.svg"/>
</button>

这是scss代码:

@import "~bootstrap/scss/_functions.scss";
@import "../../scss/variables";

.coverage-item {
  background: $white;
  border: 1.5px solid $brand-primary;
  color: $gray-light;
  height: 3.5rem;
  width: 3.5rem;
  position: relative;
  font-size: 1.5rem;
  padding: 0rem 0rem;
}

.coverage-item__new {
  background: $white;
  border: 1.5px dashed $gray-lighter;
  color: $gray-light;
  height: 3.5rem;
  width: 3.5rem;
  position: relative;
  font-size: 1.5rem;
  padding: 0rem 0rem;

1 个答案:

答案 0 :(得分:0)

我刚刚将此代码添加到我的scss文件中,它正在运行。

app-coverage-item {
  .tooltip {
    margin-left: -2px;
  }
}