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

How to set global color in uni-app

藏色散人
Release: 2023-01-13 00:44:42
Original
11342 people have browsed it

Uni-app method to set global color: 1. Set the global background color by adding "page{background-color: #fff;}"; 2. By referencing "@import " in App.vue common/globalClass.css";" to set the color.

How to set global color in uni-app

The operating environment of this article: windows7 system, uni-app version 2.5.1, DELL G3 computer.

How to set the global color of uni-app?

Uni-app global background color setting

The blank part is gray. If you want to set it to white,

directly enter the code

If not, create a new file

/* 设置全局背景色 */

page {

    background-color: #fff;

}
Copy after login

Quote

/* 自定义全局css样式 */
	@import "common/globalClass.css";
Copy after login

in App.vue and refresh to view the effect

becomes white

Recommended :《uniapp tutorial

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