非常简单的 jQuery 滑动照片
所以我正在寻找一个基本的 jQuery 照片卷轴类型的东西放在我网站的主页上,我发现 此页面。
我想要的只是看起来像普通的 (没有文本,没有要切换的箭头),每 5 秒滑动一张新照片......足够简单。
我找到了这个示例代码...这正是我想要的,非常简单,只不过它使用交叉淡入淡出而不是水平滑动。
我还发现了 这个 jQuery 插件,它看起来比我需要的复杂得多,但是有我想要的那种转变。
结合两者的最简单方法是什么,所以我有一个非常简单的自动图像幻灯片(没有文本或箭头),但它使用“简单幻灯片”插件中的良好过渡?
So I'm looking for a basic jQuery photo-reel type thing to put on my site's homepage, and I found this page.
What I want is simply what looks like a plain <img>
(no text, no arrows to switch), which slides a new photo across every 5 seconds... simple enough.
I found this sample code... which is exactly what I want, really simple, except it uses a crossfade instead of a horizontal slide.
I also found this jQuery plugin, which looks much more complex than I need, but has the kind of transition I want.
What's the easiest way of combining the two, so I have a really simple automated image slide (with no text or arrows), but it uses the nice transition in the 'easy slide' plugin?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
jquery Cycle 是一个非常广泛的 jquery 插件,你可以使用它。
你可以随心所欲地使用它,但基础知识完全支持你所需要的。
看一下这个例子:
html:
css:
script:
你可以使用更多 选项 或效果,但这些基础知识正是您所要求的。
编辑:
甚至还有这个 jquery.cycle 插件的 精简版,它也能满足您的所有要求,并省略了一些您的示例不需要的更高级的内容。
这个精简版插件的优点是它比完整插件小得多。对最终用户来说更好。
jquery cycle is a very extensive plugin for jquery, you could use that one.
you can go as far as you want with it, but the basics support exactly what you need.
take a look at this example:
html:
css:
script:
you can use a lot more options or effects, but these basics are what you ask for.
edit:
there is even a lite version of this jquery.cycle plugin, which also does everything you ask, and leaves out some of the more advanced stuff which you don't need for your example.
upside of this lite plugin, is that it's much smaller than the full plugin. better for the end user.
Nivo 滑块 是不错的选择。仅 15kb 打包,您可以根据需要进行配置。
一旦你滑动,你就无法返回......
Nivo slider is great selection. Only 15kb packed, and you can configure it as you want.
Once you nivo slide you can't go back...