收藏
回答

用cavas-view 写组件样式不生效?

我页面上有cavas   需要个弹框  想着弹框用cavas-view  写  但是样式不生效 有没有人遇到过   只有第一个.mask生效了  其他全部是cover-view
自带样式 


   

<cover-view class="mask ">
  <cover-view class="welfare_mask">
    <cover-view style="background:url({{staticimg}}welfare_success.png) no-repeat center center;background-size:100% 100% ">
      <cover-image  src="../../pages/pic/sussced.png"></cover-image>
      <cover-view>
        <cover-view>{{text}}</cover-view>
          <cover-view>请在“我的福利”里查看详情</cover-view>
        </cover-view>
      </cover-view>
      <cover-view>
        <cover-view >
          兑换码:{{couponNum}}<cover-view class="copy" bindtap="handleCopy" data-text="{{couponNum}}">点击复制</cover-view>
        </cover-view>
        <cover-view>使用说明</cover-view>
         <cover-view class="slot">
          <slot></slot>
         </cover-view>
      </cover-view>


    </cover-view>
    <cover-image  class="cover-images" src="../../pages/pic/close.png" bindtap="close"></cover-image>
  </cover-view>



    
    
  /* components/box.wxss */
.mask {
  position: fixed;
  left0;
  top0;
  width100%;
  height100vh;
  z-index990;
  background-colorrgba(0000.6);
  display: flex;
  align-items: center;
  justify-content: center;
}


.welfare_button_error {
  width120rpx;
  height40rpx;
  font-size22rpx;
  backgroundrgba(2292292291);
  color#B2B2B2;
  line-height40rpx;
  text-align: center;
}


.welfare_mask {
  width600rpx;
}


.mask>.cover-images {
  width48rpx !important;
  height48rpx;
  position: absolute;
  bottom80rpx;
}


.welfare_mask>cover-view:nth-child(1) {
  height255rpx;
  width600rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size28rpx;
}


.welfare_mask>cover-view:nth-child(1) cover-image {
  width120rpx;
  height120rpx;
  margin-right30rpx;
}


.welfare_mask>cover-view:nth-child(1)>cover-view cover-view:nth-child(2) {
  font-size22rpx;
  margin-top7rpx;
  colorrgba(1531531531);
}


.welfare_mask>cover-view:nth-child(2) {
  height585rpx;
  width600rpx;
  padding0 40rpx;
  background: white;
  padding-top15rpx;
  font-size24rpx;
  border-radius0px 0px 20rpx 20rpx;
}


.welfare_mask>cover-view:nth-child(2)>cover-view:nth-child(1) {
  height60rpx;
  width520rpx;
  backgroundrgba(2522492361);
  border-radius4rpx;
  line-height60rpx;
  padding-left22rpx;


}


.welfare_mask>cover-view:nth-child(2)>cover-view:nth-child(2) {
  margin-top40rpx;
  margin-bottom21rpx;
  color#333333;
}


.welfare_mask>cover-view:nth-child(2)>cover-view:nth-child(3) text {
  display: block;
  line-height40rpx;
  color#666666;
}


.welfare_mask>cover-view:nth-child(2)>cover-view>.copy {
  height30rpx;
  width138rpx;
  float: right;
  border-left1px solid #CCCCCC;
  line-height30rpx;
  text-align: center;
  margin-top15rpx;
  font-size24rpx;
  font-weight: bold;
  colorrgba(19559411);
}


.slot {
  width100%;
  height400rpx;
  overflow: auto;
  display: flex;
  align-items: center;
  flex-direction: column;
}
最后一次编辑于  2020-06-22
回答关注问题邀请回答
收藏
登录 后发表内容
问题标签