Home >Web Front-end >uni-app >How to set global color in uni-app

How to set global color in uni-app

藏色散人
藏色散人Original
2021-09-11 11:46:4211376browse

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;

}

Quote

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

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!

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