Sunday, June 24, 2018

html - How to set different fonts for input placeholder and value?




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?


Answer



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


No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...