• 小程序,红包弹出层布局



    html

    <!-- 弹出层 -->
    <view class="{{hiddenMask ? 'common_mask_hidden' : 'common_mask'}}" catch:tap="closeMask" catch:touchmove="_stopTap">
        <!-- 内容层 -->
        <view class="mask_box">
            <view class="content" catch:tap="_stopTap">
                <view class="bg-box">
                    <image class="bg-img" src="/images/index/packet_bg.png" />
                    <view class="do-box">
                        <image class="do-img" src="/images/index/packet_do.png" />
                        <image class="do-img" src="/images/index/packet_do.png" />
                        <image class="do-img" src="/images/index/packet_do.png" />
                    </view>
                </view>
                <view class="close-box" catch:tap="closeMask">
                    <image class="close-img" src="/images/index/packet_close.png" />
                </view>
            </view>
        </view>
    </view>
    

    css

    /** 弹出核销码 **/
    .common_mask {
      background-color: rgba(0, 0, 0, 0.5);
      position: fixed;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      z-index: 99999;
      transition: transform 0.3s ease-in-out;
      .mask_box {
        // 控制垂直居中
        display: flex;
        align-items: center;
        height: 100%;
    
        .content {
          // 控制水平居中
          margin: 0 auto;
          display: flex;
          flex-direction: column;
          .bg-box {
            .bg-img {
               672rpx;
              height: 429rpx;
            }
            position: relative;
            .do-box {
              position: absolute;
              top:165rpx;
              left:76rpx;
              // background-color: blue;
              margin:0 auto;
               520rpx;
              display: flex;
              justify-content: space-between;
              .do-img {
                 150rpx;
                height: 200rpx;
              }
            }
          }
    
          .close-box {
            text-align: center;
            .close-img {
               62rpx;
              height: 85rpx;
            }
          }
        }
      }
    }
    
    .common_mask_hidden {
      @extend .common_mask;
      transform: translateY(100%);
      visibility: hidden;
    }
    
  • 相关阅读:
    URL中编码问题
    java得到当前时间
    java 集合类详解
    java String 详解
    java context 讲解
    java代码优化
    oracle 面试题
    查找算法总结
    10个经典的排序算法
    时间复杂度,相关排序算法时间复杂度的比较
  • 原文地址:https://www.cnblogs.com/jiqing9006/p/12955399.html
Copyright © 2020-2023  润新知