使用 yui 实现图像滚动
谁能告诉我如何实现基于 yui 轮播的图像滚动器? 它也会响应鼠标滚轮事件吗?
Can any one tell me how to implement a yui carousel based image scroller ?
Will it also respond to mouse wheel event as well ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
http://developer.yahoo.com/yui/examples/carousel/csl_circular。然而
,轮播是一个 YUI2 小部件,YUI3 中支持鼠标滚轮事件(但据我所知,2 中不支持)。所以你在 YUI2 中使用鼠标滚轮 + 旋转木马就不那么幸运了。您可以在 YUI 外部使用该事件并创建一个自定义事件来订阅并从中运行回调。
http://www.java2s.com/Code/JavaScriptReference/Javascript-属性/wheelDeltaExample.htm
http://developer.yahoo.com/yui/examples/carousel/csl_circular.html
However, the carousel is a YUI2 widget, mousewheel events are supported in YUI3 (but not, as far as I can tell, in 2). So you are out of luck with mousewheel + carousel in YUI2. You could use the event outside of YUI and create a custom event to subscribe to and run your callbacks from that.
http://www.java2s.com/Code/JavaScriptReference/Javascript-Properties/wheelDeltaExample.htm