• 两个界面来回切换展示(左下角 有小demo)


     
    .zoomBox{
             800px;
            height: 550px;
            border: 1px solid green;
            margin: 0 auto;
            position: relative;
        }
        .comminBox{
            height: 100%;
             100%;
        }
        .Content{
             100%;
            height: 100%;
            position: absolute;
            left: 0;
            top: 0;
            background: rgba(20, 224, 146, 0.171);
        }
        .activeSmall_One{
            100%;
            height: 100%;
            transform: scale(0.15);
            margin-top: 28.8%;
            margin-left: -42%;
            z-index: 2;
            position: absolute;
            
        }
        .activeZoom_One{
            100%;
            height: 100%;
            100%;
            height: 100%;
            position: absolute;
            top: 0;
            left: 0;
            z-index: 1;
            animation: bgGuodu 0.8s forwards;
        }
        .twoBG{
            position: absolute;
            top: 0;
            left: 0;
        }
        .bgImg{
             100%;
            height: 100%;
            display: inline-block;
        }
        .activeSmall_Two{
            100%;
            height: 100%;
            transform: scale(0.15);
            margin-top: 28.8%;
            margin-left: -42%;
            z-index:2;
            position: absolute;
        }
        .activeZoom_Two{
            100%;
            height: 100%;
            position: absolute;
            top: 0;
            left: 0;
            z-index: 1;
            animation: bgGuodu 0.8s forwards;
        }
        @keyframes bgGuodu {
            0%{
                transform: scale(0.15);
            }
            100%{
                transform: scale(1);
            }
        }
     
     
    <div class="zoomBox">
            <div id='elemtSpecificId_One' class='comminBox activeSmall_One'>
                <div class="Content">处兑换成不VVJ的VB的把比较大</div>
            </div>
            <div id='elemtSpecificId_Two' class='comminBox twoBG'>
                <img src="./img/1.jpg" alt="" class='bgImg'>
            </div>
        </div>
     
     
     var elemtSpecificId_One = document.getElementById('elemtSpecificId_One')
               var elemtSpecificId_Two = document.getElementById('elemtSpecificId_Two')
               elemtSpecificId_One.onclick=function () {
                    console.log('放大')
                    elemtSpecificId_One.classList.remove('activeSmall_One')
                    elemtSpecificId_One.classList.add('activeZoom_One')
                    elemtSpecificId_Two.classList.add('activeSmall_Two')
                    elemtSpecificId_Two.classList.remove('activeZoom_Two')
                }
                elemtSpecificId_Two.onclick = function() {
                    console.log('缩小')
                    elemtSpecificId_One.classList.add('activeSmall_One')
                    elemtSpecificId_One.classList.remove('activeZoom_One')
                    elemtSpecificId_Two.classList.add('activeZoom_Two')
                    elemtSpecificId_Two.classList.remove('activeSmall_Two')
                }
     
     
  • 相关阅读:
    区块链python演示
    网页H5图片预览滑动模仿新浪微博插件
    AngularJS
    实现A Painless Q-learning Tutorial (深度学习笔记二)
    python线性拟合数据(深度学习笔记一)
    雪花特效登录页面
    ASP.NET Core中使用NLog记录日志
    EFCore中代码优先锲约和数据类型与数据库的对应关系
    所有数据库连接字符串示例
    看到12_234_678差点怀疑人生的事儿
  • 原文地址:https://www.cnblogs.com/lihong-123/p/13305824.html
Copyright © 2020-2023  润新知