Home > Article > Web Front-end > How to set font color in uniapp
How to set the font color in uniapp: first add the [placeholder-class] attribute to the input; then add the style to this attribute, the code is [input::-webkit-input-placeholder].
The operating environment of this tutorial: windows7 system, uni-app2.5.1 version, Dell G3 computer.
Recommended (free): uni-app development tutorial
How to set font color in uniapp:
I’ve read a lot The methods of modifying the color in the articles are all similar, but they all have no effect. The most common ones are:
input::-webkit-input-placeholder { color: #BBBBBB!important; font-size: 16px;
Finally, I tried this one and it worked.
<HTML> <input class="search-inp" type="text" value="" placeholder="请输入您的关键词" placeholder-class="co"/> <css> .co{ color: rgb(213,218,216); }
is to add placeholder- to the input. class
attribute, and then add styles to this attribute.
Related free learning recommendations: php programming (video)
The above is the detailed content of How to set font color in uniapp. For more information, please follow other related articles on the PHP Chinese website!