【发布时间】:2014-04-07 14:05:48
【问题描述】:
我在应用占位符 css 时遇到了一些问题。
我正在尝试使用伪类选择器 :-ms-input-placeholder 在输入框占位符上应用 css(即 color:#898F9C;),但它在 IE 中不起作用。
经过一番尝试后,我的问题得到了解决,但这太棒了。
如果我删除了输入框上的默认 css/样式颜色,占位符 css 在 IE 中正常工作(这是 Internet Explorer 的惊人行为)。
我的默认css/样式:
#search
{
color:blue;
}
Working-fiddle without input-box default css
我的问题是,为什么它不能在 IE 中使用默认 CSS?
【问题讨论】:
标签: internet-explorer placeholder internet-explorer-11 pseudo-class