簡體   English   中英

表格中的邊框沒有顯示在IE11中,角落處有三角形的tds

[英]borders in table not showing up in IE11 for tds with triangle at corner

 td { padding: 20px; } .note { position: relative; } .note:after { content: ""; position: absolute; top: 0; right: 0; width: 0; height: 0; display: block; border-left: 20px solid transparent; border-bottom: 20px solid transparent; border-top: 20px solid #f00; } 
 <table border="1"> <tr> <td class="note">Triangle!</td> <td>No Triangle!</td> </tr> </table> 

使用角度和工具提示,我指示懸停字段-td的三角形,但是相應的td或tr的邊框在chrome,mozilla中正常,但在IE11中沒有。

你給出的代碼在IE11中運行得很好,但在IE7中不起作用。

問題是IE正在進入IE7兼容模式。

這通常發生在測試時在本地運行代碼時。 IE設置告訴IE使用本地Intranet站點的兼容模式。 此設置適用於需要升級IE但不想更新依賴舊版本的系統的企業。

您可以通過將x-ua-compatible元標記添加到HTML代碼中,或者只需更改瀏覽器中的相關配置設置來解決此問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM