首先,我使用的是mpvue开发。样式使用的less,并且全局会定义一套主题。

@primary-color         : #ff8730;
@second-color          : #F48B4A;
@background-color      :#F3F3F3;
@second-text-color     :#787878;

.flex-center-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.flex-center-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
<style lang="less">
  @import "../../theme/orange.less";
  page {
    background-color: @background-color;
  }
</style>

页面效果如下
小程序设置页面背景颜色

相关文章:

  • 2021-04-14
  • 2021-05-18
  • 2021-04-21
  • 2021-09-19
  • 2021-12-21
  • 2021-08-05
  • 2021-12-12
猜你喜欢
  • 2022-01-01
  • 2022-01-01
  • 2021-11-26
  • 2022-01-03
  • 2021-04-01
  • 2022-12-23
  • 2021-11-23
相关资源
相似解决方案