【问题标题】:Animate half pie diagram动画半饼图
【发布时间】:2011-04-15 21:40:05
【问题描述】:

我在 Flash 中创建了这个图形“半馅饼”:http://www.elperiodico.com/es/elecciones-28n/
现在我将它移植到 JavaScript:http://especiales.elperiodico.com/LABS/ELEC2011B/html/emi-basic2.htm

我希望 JavaScript“半馅饼”使用与 Flash 版本相同的从左到右的动画,但我做不到。

有人愿意帮忙吗?

【问题讨论】:

  • 我不知道如何帮助你,但看到答案会很棒。
  • 实际上有一个想法我正在研究,看看这个空间......

标签: jquery animation highcharts


【解决方案1】:

正如我所承诺的那样,我已经看过这个,并为你做了一个好的开始,你可以与之合作:

html

<div id="graph"><img src="http://ajthomas.co.uk/back.png"></div>

css

#graph{
    background:transparent url(http://ajthomas.co.uk/graph.png) no-repeat top left; 
    height:125px; 
    width:290px; 
    overflow:hidden;
}

jquery

$("img").rotate({ 
   bind: 
     { 
        click : function() { 
            $(this).rotate({animateTo:180})
        }
     }   
});

在这里查看它的实际效果 - http://jsfiddle.net/ajthomascouk/hWt2v/

它使用一个名为 'jqueryrotate' 的插件在这里查看 - http://code.google.com/p/jqueryrotate/

希望这能给你一个好的起点。

阿尔

【讨论】:

  • 非常感谢,我会尽力告诉你的
猜你喜欢
  • 1970-01-01
  • 2012-01-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-04-12
  • 1970-01-01
  • 1970-01-01
  • 2012-06-03
相关资源
最近更新 更多