简体   繁体   中英

Placeholder not working with internet explorer

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 ?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM