• css实现动画效果 animation: showLayer 0.2s linear both



                         class="popup spec" 
                :class="specClass"
                @touchmove.stop.prevent="stopPrevent"
                @click="toggleSpec"
            >
                
                
                
                    
                        
                        
                            ¥328.00
                            库存:188件
                            
                                已选:
                                v-for="(sItem, sIndex) in specSelected" :key="sIndex">
                                    {{sItem.name}}
                                

                            

                        

                    

                    
                        {{item.name}}
                        
                                                         v-for="(childItem, childIndex) in specChildList" 
                                v-if="childItem.pid === item.id"
                                :key="childIndex" class="tit"
                                :class="{selected: childItem.selected}"
                                @click="selectSpec(childIndex, childItem.pid)"
                            >
                                {{childItem.name}}
                            
                        

                    

                    
                

            


        /*  弹出层 */
        .popup {
            position: fixed;
            left: 0;
            top: 0;
            right: 0;
            bottom: 0;
            z-index: 99;
            
            &.show {
                display: block;
                .mask{
                    animation: showPopup 0.2s linear both;
                }
                .layer {
                    animation: showLayer 0.2s linear both;
                }
            }
            &.hide {
                .mask{
                    animation: hidePopup 0.2s linear both;
                }
                .layer {
                    animation: hideLayer 0.2s linear both;
                }
            }
            &.none {
                display: none;
            }
            .mask{
                position: fixed;
                top: 0;
                width: 100%;
                height: 100%;
                z-index: 1;
                background-color: rgba(0, 0, 0, 0.4);
            }
            .layer {
                position: fixed;
                z-index: 99;
                bottom: 0;
                width: 100%;
                min-height: 40vh;
                border-radius: 10upx 10upx 0 0;
                background-color: #fff;
                .btn{
                    height: 66upx;
                    line-height: 66upx;
                    border-radius: 100upx;
                    background: $uni-color-primary;
                    font-size: $font-base + 2upx;
                    color: #fff;
                    margin: 30upx auto 20upx;
                }
            }
            @keyframes showPopup {
                0% {
                    opacity: 0;
                }
                100% {
                    opacity: 1;
                }
            }
            @keyframes hidePopup {
                0% {
                    opacity: 1;
                }
                100% {
                    opacity: 0;
                }
            }
            @keyframes showLayer {
                0% {
                    transform: translateY(120%);
                }
                100% {
                    transform: translateY(0%);
                }
            }
            @keyframes hideLayer {
                0% {
                    transform: translateY(0);
                }
                100% {
                    transform: translateY(120%);
                }
            }
        }

  • 相关阅读:
    C++之STL容器(2/3)
    Selenium IDE 的使用指南
    详细解读_SpringMvc类型转换&数据格式化&数据验证
    vite-element-plus
    JAVA:实现Harshad Number哈沙德数算法(附完整源码)
    视觉SLAM十四讲_4李群与李代数
    [经验] 天猫盒子怎么投屏手机照片 #经验分享#其他#经验分享
    XSS 从 PDF 中窃取数据
    volatile 关键字有什么用?它的实现原理是什么?
    MySQL内部函数介绍
  • 原文地址:https://blog.csdn.net/happyzhlb/article/details/136532379