【发布时间】:2016-03-16 17:36:55
【问题描述】:
这里是 plunker 代码。 http://plnkr.co/edit/C1khFJqTUutDaK9ad7ud?p=preview
我需要更改工具提示箭头。示例中工具提示的位置是顶部、底部和左侧。
谁能告诉我如何设置这些工具提示的样式。我需要为工具提示的不同位置为工具提示箭头着色。
例如
tooltip at top-> arrow color should be red
tooltip at bottom-> arrow color green
tooltip at left-> arrow color yellow
谁能告诉我如何获取这些类并将颜色应用于这些工具提示。
这里是代码
HTML
<div ng-controller="TooltipDemoCtrl">
<br><br><br>
<div ng-class="{'has-error' : !inputModel}">
<input type="text" ng-model="inputModel" class="test"
uib-tooltip="Tooltip TBD"
tooltip-placement="top"
tooltip-trigger="mouseenter"
tooltip-enable="!inputModel" />
</div>
</div>
CSS
.tooltip .tooltip-inner {
color: white;
background-color: blue;
border-radius:5px;
}
.tooltip .tooltip-arrow {
//cant get the class for the arrow
}
【问题讨论】:
-
看看这个答案:stackoverflow.com/a/38279489/3554107。对于每个方向箭头的样式,我们必须使用 CSS 属性选择器选择每个箭头,然后单独设置它们。
标签: javascript jquery css angularjs angular-ui-bootstrap