寻找一个简单的淡入淡出 javascript 图像旋转器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5480076/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Looking for a simple fade javascript image rotator
提问by Darius
I need a simple image rotator that rotates images by fading, centers vertically and is accepted by most if not all browsers. I however need to be able to customize the arrow images and place them anywhere i like. Anyone know of one?
我需要一个简单的图像旋转器,它通过淡入淡出旋转图像,垂直居中,并且被大多数浏览器接受。但是,我需要能够自定义箭头图像并将它们放置在我喜欢的任何地方。有人知道吗?
If I try to visually show you what I need it would look like this.
如果我尝试直观地向您展示我需要的东西,它看起来像这样。
< -- My back button [ image ] My next button -- >
<--我的后退按钮[图像]我的下一个按钮-->
I use jquery :) I've given plenty of rotators a shot already but they don't accept images of varying sizes or are not customizable.
我使用 jquery :) 我已经给了很多旋转器一个镜头,但它们不接受不同大小的图像或不可定制的图像。
回答by Jeff B
If all you need is image rotation, why not do it yourself?
如果您只需要图像旋转,为什么不自己做呢?
It's only a few lines of jQuery and infinitely customizable. :)
它只有几行 jQuery 并且可以无限定制。:)
回答by Kirk Beard
I generally like to stick to using this one: http://jquery.malsup.com/cycle/
我一般喜欢坚持使用这个:http: //jquery.malsup.com/cycle/
It can be as simple or as complex as you need, and is highly extensible. They also provide heaps of examples for what can be done with it.
它可以根据您的需要简单或复杂,并且具有高度的可扩展性。他们还提供了大量示例,说明可以用它做什么。
Example with next/previous buttons here: http://jquery.malsup.com/cycle/int2.html
此处带有下一个/上一个按钮的示例:http: //jquery.malsup.com/cycle/int2.html
回答by Code Maverick
Have you tried http://aviathemes.com/aviaslider/? It is customizable and is amazing.
你试过http://aviathemes.com/aviaslider/吗?它是可定制的,非常棒。
回答by Hussein
Use jQuerytools scrollable by flowplayer. Very lightweight, flexible and they offer a CDN link to there js files so you don't have to load it from your server.
使用可由 flowplayer 滚动的 jQuerytools。非常轻巧、灵活,并且它们提供指向 js 文件的 CDN 链接,因此您不必从服务器加载它。
Scrollablehttp://flowplayer.org/tools/demos/scrollable/gallery.html
可滚动http://flowplayer.org/tools/demos/scrollable/gallery.html
Make sure to try out all there available scrollable examples.
确保尝试所有可用的可滚动示例。
CDN links can be found at http://flowplayer.org/tools/download/index.html