如何使用 jQuery 将滑块过渡添加到我的网站?
我正在使用 jQuery 库,因此它是可用的。我需要知道如何为此页面添加滑动效果:
请注意,当您单击它时,它会淡入和淡出,但我更喜欢它滑动,我对它们的工作原理有一个小想法,但是以当前编码的方式,但不确定正确的方式实施一项的技术。最简单的方法是什么?
非常感谢。
I am using the jQuery library so that is available. I need to know how to add a sliding effect to this page:
Notice when you click it, it fades in and out, but I would much rather love it to slide, I have a small idea on how they work but, in the way it is currently coded, but not sure the proper technique in implementing one. what could be the easiest way?
Many thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我了解您的网站,您有这段代码可以实现淡入淡出过渡:
如果您希望它滑动,那么使用 jQuery UI 可能会更容易。如果你想要向左滑动和淡出之类的东西,那么你可以使用 jQuery UI 中的下拉过渡来完成此操作:
我显然没有尝试在你的网站上运行这个确切的代码,但它肯定会看起来像这样。
您可以在此处找到有关放置效果的更多信息:
希望这有帮助。 :)
As I understand your site, you have this code that does the fading transition:
If you wanted it to slide, it'd probably be easier to use jQuery UI. If you want something like to slide and fade off to the left, then you could use the drop transition in jQuery UI to accomplish this:
I obviously didn't try running this exact code on your site, but it will definitely look something like that.
You can find out more about the drop effect here:
Hopefully this helps. :)