fail to change placeholder color with Bootstrap 3

前端 未结 10 944
暗喜
暗喜 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:56

    With LESS the actual mixin is in vendor-prefixes.less

    .placeholder(@color: @input-color-placeholder) {
    ...
    }
    

    This mixin is called in forms.less on line 133:

    .placeholder();
    

    Your solution in LESS is:

    .placeholder(#fff);
    

    Imho the best way to go. Just use Winless or a composer compiler like Gulp/Grunt works, too and even better/faster.

提交回复
热议问题