English 中文(简体)
Raphaeljs: 闪光阴影的动画路径
原标题:Raphael js: animating path with it s drop shadow
  • 时间:2012-05-24 19:38:08
  •  标签:
  • svg
  • raphael

我不确定如何从这条路中消失, 以及我为它创造的下沉的阴影:

 var p = "M10,10L810,10L810,190L10,190L10,10";
  var s = "M16,16L816,16L816,196L16,196L16,16";
var paper = Raphael(100, 100, 830, 210);
var shadow = paper.path(s);
shadow.attr({stroke: "none", fill: "#999999", opacity:0.1});
shadow.blur(4);


var c = paper.path(p);
c.attr({fill:"#ffffff", stroke:"none"});

难道我必须同时手动动画和阴影吗?

最佳回答

将路径和阴影放在一组中。 将动画应用到集中, 它会同时影响两个部分 。

http://jsfidle.net/amadanNM/Y396M/"rel="nofollow"。 这里的这个非常可怕的例子,我同时移动。

问题回答

Maybe animating the drop shadow path to match the specification of the other path? http://www.irunmywebsite.com/raphael/additionalhelp.php?q=fadingdropshadow

the amadan answer is incorrect. please discard it. If you put elements in a set, the glow will be part of the set but set is logical only. it means that if you animate the set, your shadow animation will look wierd.

use set only to refer to logical zoning for events for instance. best is to animate the shadows in // of the other objects.





相关问题
How to simplify SVG code?

Is it possible to simplify / clean up svg code by replacing the use-tags with standard svg elements? Maybe an inkscape plugin? Haven t found anything... Background: I m converting some svgs to javafx ...

How to link from SVG?

What I tried is this <a xlink:target="http://ponyoverflow.com"> <text class="text" x="20" y="718" text-anchor="start">Mail Order Ponies</text> </a> and variations with href ...

Ruby Support for SVG

Is there some library or helper to produce SVG graphics with Ruby? I googled a bit and found many, but all seem to be dusty and very incomplete… Does anyone know about some nice, reliable alternative?

Mangling IDs and References to IDs in XML

I m trying to compose xml elements into each other, and the problem I am having is when there s the same IDs. Basically what I need to do is mangle all the IDs in an xml file, as well as the ...

热门标签