CSS不适用于span标签悬停,它位于Internet Explorer中的按钮标签内,我有按钮,如果你将鼠标悬停在它上面,它会显示工具提示,如果你悬停它应该消失的提示,它是工作在FF和Chrome,但不是IE浏览器,我知道我应该使用:悬停在IE浏览器中不工作的按钮范围内
.tooltip:悬停的.tooltiptext
代替
。的ToolTipText:悬停
.tooltip {
position: relative;
display: inline-block;
border-bottom: 1px dotted black;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 120px;
background-color: black;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px 0;
/* Position the tooltip */
position: absolute;
z-index: 1;
}
.tooltip:hover .tooltiptext {
visibility: visible;
}
.tooltiptext:hover {
display: none;
}
<!DOCTYPE html>
<html>
<body style="text-align:center;">
<div class="tooltip">
<button type="button">Hover me
<span class="tooltiptext">Tooltip text</span>
</button>
</div>
</body>
</html>
什么建议,我开过的jQuery使用。谢谢。
哪个版本的IE浏览器导致的问题? – smekosh
我正在测试IE 11 – Hessam