Input is provided in the input box placeholder font color, font size

First, notice 
  when placeholder attribute css3 newly added properties, IE9 and Opera12 following versions of CSS selectors do not support the occupation of text.

Second, set the placeholder text color, font size 
mode 1 
  because each browser CSS selectors have the difference, so it is necessary to make separate settings for each browser (written just before the colon input and textarea).

    ::-webkit-input-placeholder{/*Webkit browsers*/
    color:#999;
    font-size:16px;
    }
    :-moz-placeholder{/*Mozilla Firefox 4 to 8*/
    color:#999;
    font-size:16px;
    }
    ::moz-placeholder{/*Mozilla Firefox 19+*/
    color:#999;
    font-size:16px;
    }
    :-ms-input-placeholder{/*Internet Explorer 10+*/
    color:#999;
    font-size:16px;
    }

 

Mode 2 is recommended to use this way, if it is only the end webview in kernel mode to handset customers -webkit. 
    :: INPUT - WebKit-INPUT-placeholder, TextArea :: - {placeholder WebKit-INPUT- 
    Color: # 666; 
    font-size: 16px; 
    }

    input:-moz-placeholder,textarea:-moz-placeholder{ 
    color:#666; 
    font-size:16px; 
    }

    input::-moz-placeholder,textarea::-moz-placeholder{ 
    color:#666; 
    font-size:16px; 
    } 
    input:-ms-input-placeholder,textarea:-ms-input-placeholder{ 
    color:#666; 
    font-size:16px; 
    }

Guess you like

Origin www.cnblogs.com/qhantime/p/11328102.html