<分区>
<分区>
占位符颜色仅在 IE 9 中不起作用。其他浏览器工作正常。 谁能告诉我 IE9 需要哪个 css?我使用了一个 div -> 选择元素 -> 默认输入字段。想要更改占位符的文本颜色。我在 Google 上搜索它将在 IE 10+ 上运行
input:-ms-input-placeholder {
color:#27AE60 !important;
}
<input type="text" ng-model="inputText" placeholder="somePlaceholder" />
#dropdown_ID div.selectize-control div.selectize-input input:-ms-input-placeholder {
color:#27AE60 !important;
}
最佳答案
是的,你是对的。 IE 不支持占位符属性。 我发现这两个链接对于在 IE 中选择占位符问题的替代方案很有用。
推荐链接:
https://mathiasbynens.github.io/jquery-placeholder/
http://www.hagenburger.net/BLOG/HTML5-Input-Placeholder-Fix-With-jQuery.html
您可以使用任何方式来解决您的问题。
关于html - 输入占位符 css 在 IE9 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34876737/