How to set different fonts for input placeholder and value?

This question already has an answer here:

  • Change an HTML5 input's placeholder color with CSS 31 answers

  • You can do this by targeting the placeholder text in css. Then setting color on the input to be something else

    ::-webkit-input-placeholder {
       color: red;
    }
    
    :-moz-placeholder { 
       color: red;  
    }
    
    ::-moz-placeholder {  
       color: red;  
    }
    
    :-ms-input-placeholder {  
       color: red;  
    }
    

    JSFIDDLE

    链接地址: http://www.djcxy.com/p/12160.html

    上一篇: 你如何改变占位符的属性和样式?

    下一篇: 如何为输入占位符和值设置不同的字体?