当光标在div的边缘时如何滚动? [英] How to scroll when cursor is on the edge of div?

查看:142
本文介绍了当光标在div的边缘时如何滚动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个div(menubar)有很多链接,这些链接都在视图之外。当光标位于菜单div的边缘时,必须使div向右或向左滚动,以便将这些菜单项放入视图中。

I have a div(menubar) that has a lot of links and these links are out of the view. I must make the div scroll to the right or left when the cursor is at the edge of the menu div, in order to bring these menu items into the view.

标记在Jsfiddle

推荐答案

短:

Short:

使用就绪解决方案:

  • Scrolling-carousel
  • Jmycarousel (demo)
  • Smooth div scroll

完整

  • jQuery plugin to continually horizontally scroll on mouseover
  • Looking for jQuery plugin (or code) to automatically scroll Carousel items on mousover

这篇关于当光标在div的边缘时如何滚动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆