呼叫007 2021-12-14 11:11 采纳率: 63.2%
浏览 143
已结题

请问这个怎么做微信小程序动画?

请问怎么在微信小程序里作出动画,就是从

img


这样动画成

img

然后能够不断运行

  • 写回答

4条回答 默认 最新

  • ZionHH 2021-12-14 17:40
    关注
    获得1.60元问题酬金

    img

    代码片段:https://developers.weixin.qq.com/s/4hSavxmS7mvq

    <view class="wave">
      <image src="./contact.png" mode="cover"></image>
    </view>
    
    .wave {
      width: 200rpx;
      height: 200rpx;
      margin: 40rpx auto;
      display: flex;
      justify-content: center;
      align-items: center;
      border-radius: 50%;
      overflow: hidden;
      position: relative;
    }
    .wave::before,
    .wave::after {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      border-radius: 50%;
    }
    .wave::before {
      background-color: rgba(100, 134, 178, .4);
      animation: wave 2s infinite;
      z-index: 1;
    }
    .wave::after {
      background-color: rgba(100, 134, 178, .4);
      animation: wave 2s infinite;
      animation-delay: .3s;
      z-index: 2;
    }
    .wave image {
      width: 60rpx;
      height: 60rpx;
      position: absolute;
      border-radius: 50%;
      z-index: 3;
    }
    @keyframes wave {
      0% {
        opacity: 1;
        transform: scale(0);
      }
      100% {
        opacity: 0;
        transform: scale(1);
      }
    }
    
    评论 编辑记录

报告相同问题?

问题事件

  • 系统已结题 12月22日
  • 赞助了问题酬金 12月14日
  • 创建了问题 12月14日

悬赏问题

  • ¥15 目详情-五一模拟赛详情页
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line