2016-01-22 143 views
1

不工作本頁面在IE9懸停提示工作,但並沒有做任何事情在IE11企業模式與兼容性視圖設置,如IE8的工作:工具提示懸停在IE11

有人能幫助解釋爲什麼IE11是對待它有何不同?

<!DOCTYPE html> 
 
<html lang="en"> 
 

 

 
<head> 
 

 
\t <meta charset='UTF-8'> 
 
\t <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /> 
 
\t <meta http-equiv="Pragma" content="no-cache" /> 
 
\t <meta http-equiv="Expires" content="0" /> 
 

 
\t <title>Current Payroll Status</title> 
 
\t <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script> 
 

 

 
\t <style> 
 

 
.hover { 
 
    position:relative; 
 
    left:1px; 
 
} 
 

 
.tooltip { /* hide and position tooltip */ 
 
    top:-10px; 
 
    background-color:black; 
 
    color:white; 
 
    border-radius:5px; 
 
    opacity:0; 
 
    -webkit-transition: opacity 0.5s; 
 
    -moz-transition: opacity 0.5s; 
 
    -ms-transition: opacity 0.5s; 
 
    -o-transition: opacity 0.5s; 
 
    transition: opacity 0.5s; 
 
} 
 

 
.hover:hover .tooltip { /* display tooltip on hover */ 
 
    opacity:1; 
 
} 
 
\t </style> 
 

 
</head> 
 

 

 
<body> 
 
<table cellspacing="0" cellpadding="0" width="40%"> 
 

 
\t <TR> 
 

 
\t \t <TD rowspan="1" colspan="1" valign="top" width="33%"><center> 
 

 
\t \t \t <div class="hover">Payroll Calculation<div class="tooltip"></center> 
 

 
\t \t \t \t <table cellspacing="0" cellpadding="4" width="100%"> 
 

 
\t \t \t \t \t <TR><TD>Avg Runtime:</TD><TD>49.89m</TD></TR> 
 

 
\t \t \t \t </table> 
 

 
\t \t \t </div></div> 
 

 
\t \t </TD> 
 
\t </TR> 
 

 
</table> 
 

 
</body>

+0

修剪你的示例代碼,提供http://codepen.io/pen/ –

+0

完成。任何幫助將不勝感激。 – sje123456

回答

0

從您的HTML代碼中的雜散<center> </center>

<table cellspacing="0" cellpadding="0" width="40%"> 

    <TR> 

     <TD rowspan="1" colspan="1" valign="top" width="33%"> 

      <div class="hover">Payroll Calculation<div class="tooltip"> 

       <table cellspacing="0" cellpadding="4" width="100%"> 

        <TR><TD>Avg Runtime:</TD><TD>49.89m</TD></TR> 

       </table> 

      </div></div> 

     </TD> 
    </TR> 

</table> 

http://codepen.io/anon/pen/aNovLr

+0

做到了!謝謝! – sje123456