Home >Web Front-end >uni-app >How to set font color in uniapp

How to set font color in uniapp

coldplay.xixi
coldplay.xixiOriginal
2020-12-15 15:36:2413685browse

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].

How to set font color in uniapp

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:How to run hello uniappNext article:How to run hello uniapp