How to set the color and font style of placeholder text

后端 未结 5 1178
没有蜡笔的小新
没有蜡笔的小新 2021-02-13 19:17

I want to set the color to the placeholder, change the font style to bold, and increase the size.

How can I achieve this? Should I give style to the placeholder, or is t

5条回答
  •  [愿得一人]
    2021-02-13 20:00

    Here is the for customizing placeholder

    ::-webkit-input-placeholder { /* WebKit, Blink, Edge */
        color:    #909;
        font-size:12px;
    }
    :-moz-placeholder { /* Mozilla Firefox 4 to 18 */
       color:    #909;
       font-size:12px;
    }
    ::-moz-placeholder { /* Mozilla Firefox 19+ */
       color:    #909;
       font-size:12px;
    }
    :-ms-input-placeholder { /* Internet Explorer 10-11 */
       color:    #909;
       font-size:12px;
    }
    

提交回复
热议问题