【发布时间】:2017-12-22 22:52:14
【问题描述】:
我尝试使用 tooltip-append-to-body="true" 自定义工具提示样式,但它不起作用。
这是我的代码:
<i class="fa fa-minus-square-o" tooltip-append-to-body="true" tooltip-class="customClass" tooltip="Test tooltip"></i>
在 CSS 文件中:
.customClass .tooltip-inner {
max-width: 100px;
width: 50px;
}
但工具提示的宽度从未改变,它具有来自bootstrap.css 的默认 200 像素。
我也尝试使用以下代码:
<i class="fa fa-minus-square-o" tooltip="Test tooltip" tooltip-class="customClass" tooltip-append-to-body="true"> </i>
使用 CSS:
.tooltip.customClass .tooltip-inner {
max-width: 100px;
width: 50px;
}
它也不起作用。
我正在使用ui-bootstrap-tpls.0.11.0,不知道这是不是因为旧版本的 ui-bootstrap 不支持 tooltip-class。如果是这种情况,我是否可以为工具提示添加样式?
【问题讨论】:
-
您实际上想要自定义什么?