search
HomeWeChat AppletMini Program DevelopmentModify the background color of a single page of the mini program

Modify the background color of a single page of the mini program

Feb 08, 2021 am 10:22 AM
Appletsbackground color

Modify the background color of a single page of the mini program

First of all, I planned to set a global background color, so I set the windows object in app.json as follows:

  "window": {
    "backgroundTextStyle": "light",
    "navigationBarBackgroundColor": "#fff",
    "backgroundColor": "#f6f6f8",
    "navigationBarTextStyle": "black"
  },

The first reaction on the page was the same. Using a separate json file to set

{
      "backgroundColor": "#fff",
      "navigationBarTitleText": "添加评价"
}

I found out decisively that it was useless and the page background was still gray.

Modify the background color of a single page of the mini program

(Learning video sharing: Introduction to Programming)

Solution, set a page class in the corresponding wxss file:

 page {
  background-color: #fff;
}

In this way, the background color of the entire page is set to all white, and it does not affect other pages. Other pages have special requirements and can be modified in the same way.

Modify the background color of a single page of the mini program

Related recommendations: 小program development tutorial

The above is the detailed content of Modify the background color of a single page of the mini program. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:csdn. If there is any infringement, please contact admin@php.cn delete

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools