chensiyan

wxml: 把所有的页面内容用一个class为page的view标签包裹起来

  <view class="page" style="background-color: {{bgColor}}">

    ...

  </view>

 

wxss:

  .page {

    display: block;

    min-height: 100%;

    width: 100%;

    position: absolute;

    left: 0;

    top: 0;

    z-index: 1;

  }

 

Js:  在其他方法里面改变bgColor的值就可以了

  Page({

    data: {

      bgColor:  \' \'

    }

  })

分类:

技术点:

相关文章:

  • 2021-11-21
  • 2022-01-08
  • 2021-12-01
  • 2021-05-05
  • 2021-08-29
  • 2021-09-10
  • 2022-02-17
猜你喜欢
  • 2021-10-06
  • 2022-01-01
  • 2022-02-07
  • 2022-12-23
  • 2021-11-21
  • 2022-01-01
  • 2021-05-20
相关资源
相似解决方案