zoukankan      html  css  js  c++  java
  • CSS3实现放大缩小动画

    HTML

          <div>
                <div style="height: 35px;300px;background:orangered;border-radius: 4px;" id="animat"></div>
            </div>

    CSS

                #animat{
                    position:relative;
                    animation:mymove 5s infinite;
                    -webkit-animation:mymove 5s infinite; /*Safari and Chrome*/
                    animation-direction:alternate;/*轮流反向播放动画。*/
                    animation-timing-function: ease-in-out; /*动画的速度曲线*/
                    /* Safari 和 Chrome */
                    -webkit-animation:mymove 5s infinite;
                    -webkit-animation-direction:alternate;/*轮流反向播放动画。*/
                    -webkit-animation-timing-function: ease-in-out; /*动画的速度曲线*/
                }
                @keyframes mymove
                {
                    0%{
                    transform: scale(1);  /*开始为原始大小*/
                    }
                    25%{
                        transform: scale(1.1); /*放大1.1倍*/
                    }
                    50%{
                        transform: scale(1);
                    }
                    75%{
                        transform: scale(1.1);
                    }
    
                }
                
                @-webkit-keyframes mymove /*Safari and Chrome*/
                {
                    0%{
                    transform: scale(1);  /*开始为原始大小*/
                    }
                    25%{
                        transform: scale(1.1); /*放大1.1倍*/
                    }
                    50%{
                        transform: scale(1);
                    }
                    75%{
                        transform: scale(1.1);
                    }
                }
  • 相关阅读:
    3.18构建之法读后感2
    3.17Android学习
    coredns-66bff467f8-krldv CrashLoopBackOff
    6443: connect: network is unreachable
    卸载flannel
    电梯演讲
    每日学习
    梦断代码读后感1
    每日学习
    每日学习
  • 原文地址:https://www.cnblogs.com/xxflz/p/9816217.html
Copyright © 2011-2022 走看看