我有什么办法可以删除默认工具提示?

屏幕截图:



这是我的HTML:

<div class="filter-button"><a href="/category/work/" title="Work" class="tooltip"><img src="/themes/Phyre/css/img/work.png"></a></div>


...这是我的CSS:

.tooltip{
display: inline;
position: relative;
}

.tooltip:hover:after{
background: #6C8095;
border-radius: 5px;
bottom: 76px;
color: #fff;
text-align: center;
text-transform: uppercase;
content: attr(title);
left: 10%;
padding: 5px 10px;
position: absolute;
z-index: 98;
}

.tooltip:hover:before{
border: solid;
border-color: #6C8095 transparent;
border-width: 6px 6px 0 6px;
bottom: 70px;
content: "";
left: 40%;
position: absolute;
z-index: 99;
}

最佳答案

更换

title="Work"




data="Work"




content: attr(title);




content: attr(data);

关于html - 重复的工具提示修复?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/20931801/

10-12 00:09