fail to change placeholder color with Bootstrap 3

前端 未结 10 826
暗喜
暗喜 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 01:36

    A Possible Gotcha

    Recommended Sanity Check - Make sure to add the form-control class to your inputs.

    If you have bootstrap css loaded on your page, but your inputs don't have the
    class="form-control" then placeholder CSS selector won't apply to them.

    Example markup from the docs:

    I know this didn't apply to the OP's markup but as I missed this at first and spent a little bit of effort trying to debug it, I'm posting this answer to help others.

提交回复
热议问题