Input type color not working in IE 11

。_饼干妹妹 提交于 2020-03-26 12:40:13

问题


HTML-5 color type is not working in IE 11 browser and working in chrome browser as i expect. Kindly check this in both chrome browser and IE-11, give me your suggestion, Thanks in advance.

<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>

回答1:


The color input is not supported in IE11 - check out this great page.

Update

An alternative solution would be to use a polyfill - e.g. Spectrum (however, I have not tried this one yet).




回答2:


Can I use...: Color input type IE doesn't support this input type.




回答3:


for anyone encountering this question, this is the polyfill for IE support https://github.com/jonstipe/color-polyfill




回答4:


This is works for me, I added script and link in html. Credits to this link : https://github.com/bgrins/spectrum Using spectrum with a CDN CDN provided by cdnjs

" "



来源:https://stackoverflow.com/questions/34784762/input-type-color-not-working-in-ie-11

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!