Home >Web Front-end >uni-app >How to set the background color in uniapp

How to set the background color in uniapp

藏色散人
藏色散人Original
2020-12-21 15:41:267635browse

How to set the background color of uniapp: First find and open the App.vue file in the root directory; then add the code "page{background-color: #f5f5f5;}" in the style block.

How to set the background color in uniapp

The operating environment of this tutorial: windows7 system, uni-app2.5.1 version. This method is suitable for all brands of computers.

Recommended (free): uni-app development tutorial

##uni-app has a global background color setting method

Add code in the style block in the App.vue file in the root directory

<style>
/*每个页面公共css */ 
page{
background-color: #f5f5f5;
}
</style>

Single page window background color settings such as: set in the vue file of the page

<style>
  page {
      background-color: #f00;
  }
</style>

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