占位符不适用于 Internet Explorer
Placeholder not working with internet explorer
我的应用程序出现小问题,占位符在 Internet Explorer 11 中不存在。
我尝试了下面的 CSS 示例,但没有成功。
:-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;
}
关于如何解决这个问题有什么建议吗?
终于找到了解决这个问题的方法,即使使用的是 Internet Explorer 11,调试器屏幕上的仿真默认设置为 9,所以我将其添加到 HTML 的 head 标记中。
<meta http-equiv="X-UA-Compatible" content="IE=11">
将兼容格式更改为 IE11。
我的应用程序出现小问题,占位符在 Internet Explorer 11 中不存在。
我尝试了下面的 CSS 示例,但没有成功。
:-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;
}
关于如何解决这个问题有什么建议吗?
终于找到了解决这个问题的方法,即使使用的是 Internet Explorer 11,调试器屏幕上的仿真默认设置为 9,所以我将其添加到 HTML 的 head 标记中。
<meta http-equiv="X-UA-Compatible" content="IE=11">
将兼容格式更改为 IE11。