使用 Raphael.js 旋转图像
我正在尝试创建一个可以旋转动画的按钮。 我找到了一些旋转脚本,但它们不起作用,我找不到问题所在。
这还不够吗?
var angle = 90
function rotRect2()
{
rect2.animate({rotation: angle}, 1000, ">");
}
我的动画名称是 rect2,我的按钮正在调用函数 rotRect2
有帮助吗?
谢谢
Im trying to create a button that will rotate my animation.
I have found some rotating scripts, but they wont work I cant find the problem.
Shouldn't this be enough ?
var angle = 90
function rotRect2()
{
rect2.animate({rotation: angle}, 1000, ">");
}
my animation name is rect2 and my button is calling the function rotRect2
Any help ?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我想你忘记了“;”还是有其他问题?
I think you forgot the ";" there or is it another problem?
如果您正在查看此示例,
他们使用的是
{transform: "r" + angle}
形式我认为
rect
中没有rotation
属性 < a href="http://www.w3.org/TR/SVG/shapes.html#RectElement" rel="nofollow">SVG 元素If you're looking at this example,
they're using the
{transform: "r" + angle}
formI don't think there is a
rotation
attribute in therect
SVG Element