jscrollpane - 允许内容在滚动区域上扩展?

发布于 2024-10-15 07:21:30 字数 238 浏览 2 评论 0原文

我使用 jscrollpane jquery 插件。我的内容是当您将鼠标悬停在其上时会展开的图像,并在鼠标离开时缩小到正常状态。如果图像能够扩展到滚动条之外并在扩展时保持可见,我需要什么。

通过给图像一个 z 索引,我可以让它们在滚动条手柄上扩展,但我很难让它们进一步扩展。

如果我将许多元素设置为可见溢出,我可以让它工作,但随后我在屏幕底部有浏览器滚动条。

我可以让图像在展开时可见但没有浏览器滚动条吗? 谢谢

Im using the jscrollpane jquery plugin. My content are images that expand when you mouse over them, and shrink back to normal on mouseleave. What I need if for the images to be able to expand over beyond the scroll bar and remain visible while expanded.

By giving the images a z-index I can get them to expand over the scroll bar handles, but im struggling to get them to expand any further.

If I set a number of elements to having overflow visible I can get it to work, but then I have browser scroll bars at the bottom of the screen.

Can I have the images visible when they expand but no browser scroll bars?
Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

往事随风而去 2024-10-22 07:21:30

回答来自:
http://groups.google.com/group/jscrollpane/browse_thread/thread/8073378d51551efa嗨

如果我理解正确的话,你希望你的图像扩展到
滚动窗格“框”的边界?这不可能以简单的方式实现。

解决方法可能是做这样的事情:

* On mouseover clone the image that is rolled over and attach the
  clone to the body with position: absolute.
* Use jQuery to figure out the position of the image you cloned with
  respect to the body (a loop with offsetParent will be your friend
  here).
* Apply this position to the cloned image so that it is sitting
  directly above the original image then expand it.
* Listen for the mouseout event on the cloned image and when this
  happens the shrink the cloned image and then remove it from the body.

希望它有帮助,

Kelvin :)

Answer from:
http://groups.google.com/group/jscrollpane/browse_thread/thread/8073378d51551efa

Hi,

If I understand correctly you want your images to expand out of the
bounds of the scrollpane "box"? That won't be possible in a simple manner.

A workaround might be to do something like this:

* On mouseover clone the image that is rolled over and attach the
  clone to the body with position: absolute.
* Use jQuery to figure out the position of the image you cloned with
  respect to the body (a loop with offsetParent will be your friend
  here).
* Apply this position to the cloned image so that it is sitting
  directly above the original image then expand it.
* Listen for the mouseout event on the cloned image and when this
  happens the shrink the cloned image and then remove it from the body.

Hope it helps,

Kelvin :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文