uni-app App IOS端 tabbar使用gif切换时动画速度明显变慢

uni-app App IOS端 tabbar使用gif切换时动画速度明显变慢

操作步骤:

  • 点击tabbar切换页面

预期结果:

  • tabbar按钮图片gif正常

实际结果:

  • tabbar按钮图片gif动画变慢

bug描述:

示例代码:

{
  "pagePath": "pages/shop/Shop",
  "iconPath": "static/icon/new_shop.png",
  "selectedIconPath": "/static/icon/new_shoped.gif",
  "text": "商城"
}
信息类别 信息内容
产品分类 uniapp/App
PC开发环境 Windows
PC系统版本 win10
手机系统 iOS
手机系统版本 iOS 13.4
手机厂商 苹果
手机机型 所有机型
页面类型 vue
打包方式 云端
项目创建方式 CLI
CLI版本号 3.1.4

更多关于uni-app App IOS端 tabbar使用gif切换时动画速度明显变慢的实战教程也可以访问 https://www.itying.com/category-93-b0.html

2 回复

请提供完整的demo来测试,我自己测试的没有发现问题,我用的是最新的HX版本测试的

更多关于uni-app App IOS端 tabbar使用gif切换时动画速度明显变慢的实战教程也可以访问 https://www.itying.com/category-93-b0.html


在iOS端tabbar使用GIF动画变慢是常见问题,主要原因是iOS系统对GIF渲染性能的限制。建议采用以下解决方案:

  1. 将GIF转换为序列帧图片,通过CSS动画实现:
.tabbar-icon {
  animation: play 0.8s steps(10) infinite;
}
[@keyframes](/user/keyframes) play {
  from { background-position: 0 0; }
  to { background-position: -1000px 0; }
}
回到顶部