多指针仪表盘,修改两个指针为不同颜色,是如何修改的?

1814478E-8EC1-433e-873D-B508C5DDB775.png

FineReport 冥河 发布于 2022-5-12 15:23
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共1回答
最佳回答
0
用户6NWif5139660Lv6资深互助
发布于2022-5-12 15:25(编辑于 2022-5-12 15:33)

https://bbs.fanruan.com/wenda/question/60377.html

参考

var colors = ["rgb(250,192,30)", "rgb(14,142,250)", "rgb(91,10,4)"];var colorIndex = 0;var that = this;var t = setInterval(function() { var paths = $(that.element).find("path[style*='fill: rgb(229, 113, 90);']") if (paths[0]) {  $(paths).off("mousemove");  clearInterval(t);  paths.each(function() { $(this).mouseover(function(event) {  event.preventDefault();   event.stopPropagation();   return false; }); $(this).mouseout(function(event) {  event.preventDefault();   event.stopPropagation();   return false; }); $(this).mousemove(function(event) {  event.preventDefault();   event.stopPropagation();   return false; });   $(this).css('fill', colors[colorIndex]);   colorIndex++;  });  colorIndex = 0; }}, 300);

  • 冥河 冥河(提问者) 颜色那边改成RGB那种形式或者HEX形式的要怎么写初始化事件?
    2022-05-12 15:28 
  • 2关注人数
  • 399浏览人数
  • 最后回答于:2022-5-12 15:33
    请选择关闭问题的原因
    确定 取消
    返回顶部