
答案1
導致此問題的原因是 stackexchange 編輯器使用背景圖像作為其圖示。在高對比模式下,所有背景影像都會被刪除。解決這個問題的唯一方法是使用 @media 查詢(用於高對比度)和/或不使用背景屬性,而是使用內容屬性。
[element]:after {content: url([image url]);} 僅此一項就可以讓圖像顯示出來。除非與背景的對比度足夠高,否則它不會使其對所有用戶可見。
.wmd-button > span**:after** { 內容:url("../../Img/unified/wmd-buttons.svg?v=71f92841a4f1");背景大小:初始!
以下程式碼將在 Windows(Edge 和 IE11)中運行,以提供可在高對比度(活動、白底黑字、黑底白字)下工作的自訂彩色按鈕:
@media screen and (-ms-high-contrast:active){ .wmd-button > span:after { content: url("../../Img/unified/wmd-buttons.svg?v=71f92841a4f1") ;背景大小:初始! } }