Home > Article > Web Front-end > How to set page background color in uniapp
Uniapp method to set the background color of the page: 1. Use the relevant code to set [page{background-color:#ddd;}]; 2. If you want to set the background of the window, you can set it in [pages.json] Set in, the code is [backgroundColor": "#ddd].
The operating environment of this tutorial: windows7 system, uni-app2.5.1 version, Dell G3 computer.
Recommended (free): uni-app development tutorial
uniapp How to set the background color of the page:
If you want to set the background color for the page, you should set it as follows
page{ background-color:#ddd; }
If you want to set the background of the window, you can set it in pages.json , as follows
{ "pages": [ { "path": "pages/index/index", "style": { “backgroundColor”:“#ddd” } } ] }
Related free learning recommendations:Programming Video
The above is the detailed content of How to set page background color in uniapp. For more information, please follow other related articles on the PHP Chinese website!