【问题标题】:filter invert not working in IE (Internet Explorer)过滤反转在 IE (Internet Explorer) 中不起作用
【发布时间】:2020-03-10 01:33:23
【问题描述】:

过滤反转在 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>

image

【问题讨论】:

    标签: jquery html css angular bootstrap-4


    【解决方案1】:

    CSS 过滤器仅适用于 WebKit 和 Firefox。它在 IE 或 Opera 中不起作用。 WebKit 是目前唯一支持 CSS 过滤器的浏览器。

    没有好的方法可以在 IE 中实现这一点,因为它放弃了对旧版 IE 过滤器的支持。

    【讨论】:

    • 任何其他方式,做
    • 给我建议
    • 在 3-4 天前我没有对这件事进行研究,与 IE 中的过滤器支持有关,但它不起作用。我试图为我自己的网站实现这一点,但我做不到。
    • 如果它有效,你可以试试这个东西。我试图做出这个解决方案,但它对我不起作用。 stackoverflow.com/questions/16407268/…
    • 我会试试你的链接
    【解决方案2】:

    可能与此 Invert filter not working on IE and safari 重复。您可以尝试接受的答案建议。

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

    【讨论】:

      猜你喜欢
      • 2015-05-28
      • 1970-01-01
      • 2013-11-02
      • 2014-04-19
      • 2018-04-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多