爲工具提示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