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