【问题标题】:Input type color not working in IE 11输入类型颜色在 IE 11 中不起作用
【发布时间】:2020-03-18 09:58:13
【问题描述】:

HTML-5 颜色类型在 IE 11 浏览器中无法正常工作,并且在 chrome 浏览器中无法正常工作。 请在 chrome 浏览器和 IE-11 中检查这个,给我你的建议,在此先感谢。

<div class="col-sm-8 cngcolor">
                                <input type="color" id="background" name="background" value="#ffffff" list="colors" class="input-xs show-tick ng-pristine selectpicker form-control">
                                <datalist id="colors">
                                    <option>#ffffff</option>
                                    <option>#ff0000</option>
                                    <option>#000000</option>
                                </datalist>
                            </div>

【问题讨论】:

    标签: html google-chrome internet-explorer-11 color-picker


    【解决方案1】:

    IE11 不支持颜色输入 - check out this great page

    更新

    另一种解决方案是使用 polyfill - 例如Spectrum(不过这个我还没试过)。

    【讨论】:

    • 好吧,你能给我其他的建议吗。
    • 我会为 IE11 搜索一个颜色选择器 polyfill - 我自己没有使用过,但我相信你能找到其中的一些 - 例如。 Spectrum
    【解决方案2】:

    Can I use...: Color input type IE 不支持此输入类型。

    【讨论】:

    • 您能否给我任何其他建议以在 IE-11 中包含颜色选择器
    【解决方案3】:

    对于遇到此问题的任何人,这是 IE 支持的 polyfill https://github.com/jonstipe/color-polyfill

    【讨论】:

      【解决方案4】:

      这对我有用,我在 html 中添加了脚本和链接。 此链接的学分:https://github.com/bgrins/spectrum 将频谱与 CDN 一起使用 cdnjs提供的CDN

      " "

      【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-09
      • 2017-06-15
      • 1970-01-01
      • 2018-09-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多