css 实现内容上下浮动效果


效果

CSS

    .arrow {
          position: absolute;
          animation-name: beat;
          /*动画名称*/
          animation-duration: .8s;
          /*设置秒数*/
          animation-timing-function: linear;
          /*速度曲线*/
          animation-iteration-count: infinite;
          /*播放次数*/
          animation-direction: alternate;
          /*逆向播放*/
          animation-play-state: running;
          /*正在运行*/
        }
        @keyframes beat {
            0% {
                top: -5%;
            }

            100% {
                top: 0;
            }
        }
CSS