首页 > 解决方案 > 过滤反转在 IE (Internet Explorer) 中不起作用

问题描述

过滤反转在 IE (Internet Explorer) 中不起作用

    <!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
</script>

<style>
    .normalColor {
        filter: invert(0%);
    }
    .invertedColor {
        filter: invert(100%);
    }
</style>
</head>

<body>
<U><b>Normal image</b></U><br>
<img id="home" src="image.png" alt="Smiley face" width="500" height="300" class="normalColor">
<br>
<U><b>Invert image</b></U><br>
<img id="home" src="image.png" alt="Smiley face" width="500" height="300" class="invertedColor">
</body>

</html>

图片

标签: jqueryhtmlcssangularbootstrap-4

解决方案


此 Invert 过滤器的可能重复项在 IE 和 safari 上不起作用。您可以尝试接受的答案建议。

也尝试使用这个工具练习,https://caniuse.com/#feat=css-filters


推荐阅读