为工具提示msg定制CSS后,它在屏幕上显示两次。以下是所提供的实施方式。为工具提示定制css后,它显示两次
<a href="#" title="This is some information for our tooltip." class="tooltip">
<span title="More">CSS3 Tooltip</span>
</a>
.tooltip {
display: inline;
position: relative;
}
.tooltip:hover:after {
background: #333;
background: rgba(0,0,0,.8);
border-radius: 5px;
top: 26px;
color: #fff;
content: attr(title);
left: 20%;
padding: 5px 15px;
position: absolute;
z-index: 98;
width: 220px;
}
.tooltip:hover:before {
border: solid;
border-color: #333 transparent;
border-width: 0 6px 6px 6px;
top: 20px;
content: "";
left: 50%;
position: absolute;
z-index: 99;
}
样本输出:
帮我找到这个原因,我们如何能抑制第二提示味精
的jsfiddle(sample view)
只是删除了'内跨度title'属性。 – RRK
我删除,但仍然相同,看到更新的JSFiddle链接,我在问题 –
更新在CSS和HTML都'数据标题'而不是'title' – Dhara