【问题标题】:Input Placeholder css not working in IE9 [duplicate]输入占位符css在IE9中不起作用[重复]
【发布时间】:2016-04-24 22:09:27
【问题描述】:

占位符颜色仅在 IE 9 中不起作用。其他浏览器工作正常。 谁能告诉我IE9需要哪些CSS?我使用了一个 div -> 选择元素 -> 默认输入字段。想要更改占位符的文本颜色。我在谷歌上搜索它可以在 IE 10+ 上运行

input:-ms-input-placeholder    {
  color:#27AE60 !important;
}
<input type="text" ng-model="inputText" placeholder="somePlaceholder" />

原始 CSS 选择器:

 #dropdown_ID div.selectize-control div.selectize-input input:-ms-input-placeholder {
      color:#27AE60 !important;
  }

【问题讨论】:

标签: html css angularjs


【解决方案1】:

是的,你是对的。 IE 不支持占位符属性。 我发现这两个链接对于为 IE 中的占位符问题选择替代方案很有用。

推荐链接:

https://mathiasbynens.github.io/jquery-placeholder/
http://www.hagenburger.net/BLOG/HTML5-Input-Placeholder-Fix-With-jQuery.html

您可以使用任何方法来解决您的问题。

【讨论】:

    猜你喜欢
    • 2012-09-17
    • 2013-07-15
    • 2012-10-01
    • 2013-09-28
    • 2022-01-26
    • 2016-10-17
    • 1970-01-01
    • 1970-01-01
    • 2023-03-31
    相关资源
    最近更新 更多