【发布时间】:2017-12-18 15:54:22
【问题描述】:
我正在研究 Angular JS (1.x),我的要求是我需要在将鼠标悬停在信息图标上时显示工具提示文本。 工具提示文本显示得非常好。但问题是当我将鼠标悬停在该图标上时该图标消失了。一旦我停止悬停,图标就会再次出现。
下面是我的 HTML 代码:
<div class="col-md-4 margin-left-26">
<span ng-show="{{ job.information }}" class="glyphicon glyphicon-info-sign
spark-error-info pad-left-10" tooltip="{{job.information.sparkJob}}">
</span>
</div>
我的 CSS 来了:
.spark-error-info:hover:after{
content: attr(tooltip);
padding: 4px 8px;
color: white;
position: absolute;
left: 0;
margin-top:10px;
top: 100%;
z-index: 20;
white-space: nowrap;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
background-color: #000000;
}
.spark-error-info:hover:before{
border: solid;
border-color: #000 transparent;
border-width: 0px 10px 10px 10px;
top: 0px;
content: "";
left: 97%;
position: absolute;
z-index: 99;
}
谁能帮我解决这个问题?
这是相同的 JsFiddle:https://jsfiddle.net/gLt86eqe/4/
【问题讨论】:
-
你能解决这个问题吗?
-
你检查过这个小提琴工作了吗?它能够重现您的问题吗??
-
@SaurabhAgrawal:实际上我从未创建过小提琴。这是我第一次创建。它没有复制任何东西..这就是我想要弄清楚的..
-
现在它正在工作@SaurabhAgrawal jsfiddle.net/gLt86eqe/4
标签: css angularjs twitter-bootstrap tooltip