使用javascript在div内顺时针或逆时针旋转图像 [英] Rotate image clockwise or anticlockwise inside a div using javascript

查看:426
本文介绍了使用javascript在div内顺时针或逆时针旋转图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI,有没有办法可以顺时针或逆时针旋转div内的图像。

Is there a way by which I can rotate an image inside a div clockwise or anticlockwise.

我有一个主要的固定宽度div [溢出设置为隐藏]从数据库加载图像。有一个滚动条,用于显示div内的图像。单击图像时,我需要以顺时针或逆时针方向显示旋转动画。

I have a main fixed width div[overflow set to hidden] with images loaded from database. There is a scroll bar for showing the images inside the div. When image is clicked then I need to show the rotating animation either in clockwise or anticlockwise direction.

我使用Matrix滤镜完成了。我想知道是否可以在不使用任何过滤器的情况下在IE中完成。

I have done it using Matrix filter. I would like to know whether it is possible to be done in IE only without using any filters.

推荐答案

试试这个: http://raphaeljs.com/image-rotation.html

使用canvas但也支持IE

uses canvas but also supports IE

这篇关于使用javascript在div内顺时针或逆时针旋转图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆