zoukankan      html  css  js  c++  java
  • CSS3小方块跳动

    方块跳动

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>跳动</title>
        <style>
            .box:before {
                content: '';
                position: absolute;
                z-index: 2;
                top: 60px;
                left: 50px;
                 50px;
                height: 50px;
                background: #c00;
                border-radius: 2px;
                transform: rotate(45deg);
                -webkit-animation: box .8s infinite;
            }
    
            @-webkit-keyframes box {
                0% {
                    top: 50px;
                    transform: rotate(90deg);
                }
                20% {
                    border-radius: 2px; /*从20%的地方才开始变形*/
                }
                50% {
                    top: 80px;
                    transform: rotate(45deg);
                    border-bottom-right-radius: 25px;
                }
                80% {
                    border-radius: 2px; /*到80%的地方恢复原状*/
                }
                100% {
                    top: 50px;
                    transform: rotate(0deg);
                }
            }
    
            .box:after {
                content: '';
                position: absolute;
                z-index: 1;
                top: 128px;
                left: 52px;
                 44px;
                height: 3px;
                background: #eaeaea;
                border-radius: 100%;
                -webkit-animation: shadow .8s infinite;
            }
    
            @-webkit-keyframes shadow {
                0%, 100% {
                    left: 54px;
                     40px;
                    background: #eaeaea;
                }
                50% {
                    top: 126px;
                    left: 50px; /*让阴影保持在原位*/
                     50px;
                    height: 7px;
                    background: #eee;
                }
            }
    
    
        </style>
    </head>
    <body>
    
        <div class="box"></div>
    
    </body>
    </html>
    

      

     
  • 相关阅读:
    「NOIP2011」聪明的质监员
    「CF5E」Bindian Signalizing
    「NOIP2017」列队
    「NOIP2016」愤怒的小鸟
    「牛客CSP-S2019赛前集训营2」服务器需求
    「牛客CSP-S2019赛前集训营1」仓鼠的石子游戏
    「SCOI2010」幸运数字
    函数求值一<找规律>
    梯形
    F(k)<(维护+枚举)(找规律+递推+枚举)>
  • 原文地址:https://www.cnblogs.com/wshr210/p/11289444.html
Copyright © 2011-2022 走看看