大屏自定义动态gif图片能实现吗?

大屏自定义动态gif图片能实现吗?

FineReport 予i 发布于 2021-3-24 09:27
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共1回答
最佳回答
1
luojian0323Lv7资深互助
发布于2021-3-24 09:52(编辑于 2021-3-24 10:08)
给你个案例自己研究。这是个报表块初始化,根据报表块中的单元格的值,动态变化报表块背景色 var el = this.element.children(); setTimeout(function() { el.css("background", "url(http://99.99.99.99:8000/webroot/help/picture/yjqh/xxglq.png;)center center / 100% 100% no-repeat"); }, 200); setInterval(function(){       //获取第1行第1列A1单元格对象     var _db = $("tr[tridx=2]","div#REPORT_DNSK").children().eq(0).text();     var _f5 = $("tr[tridx=0]","div#REPORT_JJZ").children().eq(0).text();     //改变背景     if(_db=="99.99.99.99" && _f5>0){    el.css("background", "url(http://99.99.99.99:8000/webroot/help/picture/yjqh/xxglq.png;)center center / 100% 100% no-repeat");      }else if(_db=="99.99.99.99" || _f5==0){      el.css("background", "url(http://20.5.101.92:8000/webroot/help/picture/yjqh/xxhlq.png;)center center / 100% 100% no-repeat");      }else {      el.css("background", "url(http://99.99.99.99:8000/webroot/help/picture/yjqh/xxylq.png;)center center / 100% 100% no-repeat");      }        },1000)//1000表示1秒后循环刷新

当然可以实现,但是gif文件比较占用资源。不考虑性能问题。可以使用

  • 2关注人数
  • 663浏览人数
  • 最后回答于:2021-3-24 10:08
    请选择关闭问题的原因
    确定 取消
    返回顶部