xxflz

HTML

      <div>
            <div style="height: 35px;width: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);
                }
            }

 

分类:

技术点:

相关文章:

  • 2021-10-02
  • 2021-06-13
  • 2022-12-23
  • 2021-11-24
  • 2022-12-23
猜你喜欢
  • 2022-01-04
  • 2021-12-27
  • 2021-12-24
  • 2022-12-23
  • 2021-09-17
  • 2022-02-20
  • 2021-07-26
相关资源
相似解决方案