Home  >  Article  >  Web Front-end  >  How to set the background color of the uni-app navigation bar

How to set the background color of the uni-app navigation bar

coldplay.xixi
coldplay.xixiOriginal
2020-12-18 18:02:1819770browse

How to set the background color of the uuni-app navigation bar: first find the [pages.json] file and click to open it; then add navigationBarBackgroundColor to each definition part of the page; finally, the background color will be added after running it.

How to set the background color of the uni-app navigation bar

The operating environment of this tutorial: windows7 system, uni-app2.5.1 version. This method is suitable for all brands of computers.

Recommended (free): uni-app development tutorial

Set uuni-app navigation bar background Color method:

1. First find the pages.json file and click to open it, as shown in the figure below

How to set the background color of the uni-app navigation bar

2. Then usually in Add navigationBarBackgroundColor to each definition part of the page, as shown in the figure below

How to set the background color of the uni-app navigation bar

3. After running, the background color will be added, as shown in the figure below

How to set the background color of the uni-app navigation bar

4. Then if app-plus is set, it will not work, as shown in the figure below

How to set the background color of the uni-app navigation bar

5. At this time, you need to use backgroundColor in titleNView Properties, as shown in the picture below

How to set the background color of the uni-app navigation bar

6. After the final run, you can also see the background color, as shown in the picture below

How to set the background color of the uni-app navigation bar

The above is the detailed content of How to set the background color of the uni-app navigation bar. 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