如何使用客户端解决方案旋转图像
我想知道是否有任何方法可以使用客户端解决方案动态旋转图像或反转图像?我不在乎它是否是普通的旧 javascript、jquery 插件、css。我只是想知道是否有某种方法可以在客户端动态地执行此操作,而不必为我可以执行的每个图像编写服务器端代码。
我尝试在 Google 上搜索不同的关键字,但没有找到任何内容。
编辑:我正在寻找一种不需要 HTML 5 任何内容的解决方案。
I am wondering if there is any way to dynamically rotate an image or invert an image using a client side solution? I don't care if it is plain old javascript, jquery plugin, css. I just wondered if there was some way to do this dynamically on the client side rather than having to write server side code to do for each image which I can do.
I tried searching on Google for different keywords but couldn't find anything.
EDIT: I am looking for a solution that does not require anything from HTML 5.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Firefox、Safari 和 Opera 支持此操作:
您也可以在 IE8 中执行此操作,甚至可以在 7(?) 中执行此操作:
使用 JS 旋转元素:
编辑:
哇,根据 http://msdn.microsoft.com/en-us/library/ms532972%28VS.85%29.aspx 旋转适用于 IE 5.5!
Firefox, Safari and Opera support this:
you can also do this in IE8, maybe even 7(?):
rotate an element using JS:
edit:
wow, according to http://msdn.microsoft.com/en-us/library/ms532972%28VS.85%29.aspx the rotation works for IE 5.5!
非常有趣的javascript解决方案:
http://www.stableflow.com/downloads/jquery-插件/360 度产品视图/
想象一下,您正在经营一些商店或博客,并向用户展示您的产品。该解决方案允许您节省空间并通过脚本以非常真实的形式呈现产品视图。它允许忘记闪存(仍然不是所有移动设备都支持)。
您需要使用它的是:
这确实对我有用。也在 Android 手机 (lg p500)、iPad 和 iPod touch 上进行了测试。
Very interesting javascript solution:
http://www.stableflow.com/downloads/jquery-plugins/360-degrees-product-view/
Imagine that you are running some shop or blog and you present user with your products. The solution allows you to save space and present products view in very realistic form by means of the script. It allows to forget about flash (which is still not supported by all mobile devices).
What you need to utilize it is:
It really worked for me. Tested on Android mobile(lg p500), iPad and iPod touch as well.
您可以使用 canvas 元素来完成此操作,如此处所示。我不能 100% 确定所有浏览器都支持它。它是 HTML5 的一部分(在 Wikipedia 上了解更多信息),所以 FF 、Safari 和 Chrome 支持。不确定IE8。
You can do it using the canvas element, as shown here. I'm not 100% sure all browsers support it already. It is part of HTML5 (read more about it on Wikipedia), so FF, Safari and Chrome support it. Not sure about IE8.