Is the any way to set different fonts for an input placeholder and value? I need to set diffrent fonts for my input placeholder and value because they use diffrent languages. The placeholder uses an right tonleft language but the vakue uses english. Is it possible in CSS3?

有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top