Home > Web Front-end > uni-app > body text

How to set page background color in uniapp

coldplay.xixi
Release: 2023-01-13 00:44:03
Original
38544 people have browsed it

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

How to set page background 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

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;
}
Copy after login

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”
             }
        }
    ]
}
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!