Placeholder not working with internet explorer

孤街醉人 提交于 2019-12-10 13:16:45

问题


Little issue on my app, placeholders aren't present on Internet Explorer 11.

I tried the CSS sample below but without any success.

:-ms-input-placeholder { /* IE10–11 */
    color: #ccc !important;
    font-weight: 400 !important;
}

::-ms-input-placeholder { /* Edge */
    color: #ccc;
    font-weight: 400;
}

::placeholder { /* CSS Working Draft */
    color: #ccc;
    font-weight: 400;
}

Any suggestions on how to resolve this issue ?


回答1:


Finally found how to resolve this issue, the emulation was set at 9 as default on the debugger's screen even if internet explorer 11 was being used, so I added this on the head tag of the HTML.

<meta http-equiv="X-UA-Compatible" content="IE=11">

Which changes the compatability format to IE11.



来源:https://stackoverflow.com/questions/40118053/placeholder-not-working-with-internet-explorer

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