我用FontAwesome的圖標替換傳統的單選按鈕。在Chrome和Firefox中一切都很好,但是IE11遇到了問題 - 我替換單選按鈕的圖標根本沒有顯示出來。CSS:之前不工作在IE11
編輯與工作小提琴:在Chromehttps://jsfiddle.net/sow1a04m/
例子:
實例IE11:
這裏是我的HTML:
<tr>
<td class="vert-align">Valid Signed and dated delivery ticket in patient's record.</td>
<td class="text-center vert-align">
<label>
<input type="radio" name="radio-group-1" id="radio-group-1-Y" value="Y" />
</label>
</td>
<td class="text-center vert-align">
<label>
<input type="radio" name="radio-group-1" id="radio-group-1-N" value="N" />
</label>
</td>
<td class="text-center vert-align">
<label>
<input type="radio" name="radio-group-1" id="radio-group-1-NA" value="NA" />
</label>
</td>
</tr>
這是我的CSS:
#dlg-audit-intake-compliance-checklist input[type=radio] {
visibility: hidden;
}
#dlg-audit-intake-compliance-checklist input[type=radio]:hover {
cursor: pointer;
}
#dlg-audit-intake-compliance-checklist input[type=radio]:before {
visibility: visible;
font-family: FontAwesome;
content: "\f10c";
font-size: 25px;
text-shadow: 1px 1px 0px #ddd;
margin-bottom: 10px !important;
}
#dlg-audit-intake-compliance-checklist input[value=Y]:checked:before {
color: #009C15;
content: "\f00c";
}
#dlg-audit-intake-compliance-checklist input[value=N]:checked:before {
color: #AD0000;
content: "\f00d";
}
#dlg-audit-intake-compliance-checklist input[value=NA]:checked:before {
color: #F7D200;
content: "\f05e";
}
我想它可能有一些做的visibility
設置我申請,但我一直沒能弄明白我的擁有。
你可以張貼工作代碼段與鏈接所以我們的問題重現的字體,因爲現在它會有很多猜測 – LGSon
還檢查了這張貼,它可能會給提示:http://stackoverflow.com/questions/23954877/internet-explorer-11-and-supported-web-fonts – LGSon
@LGSon謝謝你!我只是用小提琴更新了我的問題,顯示了問題。在Chrome瀏覽器中查看Fiddle的效果很好,但正如您在IE11中看到的那樣,圖標不顯示。我還會檢查你發佈的鏈接。 – FastTrack