How to set the color and font style of placeholder text

后端 未结 5 1180
没有蜡笔的小新
没有蜡笔的小新 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 19:58

    you can find this and more css tricks here

    https://css-tricks.com/snippets/css/style-placeholder-text/

    ::-webkit-input-placeholder {
       color: red;
       font-weight: 800;
    }
    
    :-moz-placeholder { /* Firefox 18- */
       color: red;  
       font-weight: 800;
    }
    
    ::-moz-placeholder {  /* Firefox 19+ */
       color: red;  
       font-weight: 800;
    }
    
    :-ms-input-placeholder {  
       color: red;  
       font-weight: 800;
    }
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        

    Select City

提交回复
热议问题