fail to change placeholder color with Bootstrap 3

前端 未结 10 935
暗喜
暗喜 2021-01-31 01:27

Two questions:

  1. I am trying to make the placeholder text white. But it doesn\'t work. I am using Bootstrap 3. JSFiddle demo

  2. Another question is h

10条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-31 02:03

    There was an issue posted here about this: https://github.com/twbs/bootstrap/issues/14107

    The issue was solved by this commit: https://github.com/twbs/bootstrap/commit/bd292ca3b89da982abf34473318c77ace3417fb5

    The solution therefore is to override it back to #999 and not white as suggested (and also overriding all bootstraps styles, not just for webkit-styles):

    .form-control::-moz-placeholder {
      color: #999;
    }
    .form-control:-ms-input-placeholder {
      color: #999;
    }
    .form-control::-webkit-input-placeholder {
      color: #999;
    }
    

提交回复
热议问题