简体   繁体   English

带有jQuery的狮子般的滚动条?

[英]Lion-like scrollbar with jQuery?

Does anyone know a jQuery plugin that makes Mac OS X Lion style scrollbars for every browser? 有没有人知道一个jQuery插件,为每个浏览器制作Mac OS X Lion风格的滚动条?

Thanks in advance. 提前致谢。

Edit: Here's an image for Windows users 编辑:这是Windows用户的图像

在此输入图像描述

Interesting stuff, I wrote a plugin that does just that. 有趣的东西,我写了一个插件,就是这样。 It's called LionBars . 它被称为LionBars

Antiscroll is probably one of the best plugins available that recreates Mac OS X Lion scrollbars in every browser. Antiscroll可能是最好的插件之一,可以在每个浏览器中重新创建Mac OS X Lion滚动条。

Some of the great features of Antiscroll : Antiscroll的一些重要功能:

  1. Fades in and out 淡入淡出
  2. Size of container can be dynamically adjusted and scrollbars will adapt 容器的大小可以动态调整,滚动条可以适应
  3. Supports mousewheels, trackpads, other input devices natively 本机支持鼠标轮,触控板和其他输入设备
  4. Shows scrollbars upon hovering 在悬停时显示滚动条
  5. Supports IE7+, Firefox 3+, Chrome, Safari, Opera 支持IE7 +,Firefox 3 +,Chrome,Safari,Opera

在此输入图像描述

Demo: http://automattic.github.io/antiscroll/ 演示: http//automattic.github.io/antiscroll/

nanoScroller.js是一个用Coffeescript编码的jQuery插件,它可以完成它的工作: http ://jamesflorentino.github.com/nanoScrollerJS/

The scrollpane Jquery Plugin is the closest you'll get. 滚动窗口 Jquery插件是您最接近的。

see the lozenge demo. 看到菱形演示。

To make it more like Lion, you could customize it to only show the bar when the track div is hovered over and ensure you use the animateEase function. 为了使它更像Lion,您可以将其自定义为仅在轨道div悬停时显示条形并确保使用animateEase函数。

Oh and for extra Apple goodness change the direction of the scroll so down is up and up is down :-) 哦,为了额外的苹果善良改变滚动的方向所以下来是向上和向上下降:-)

The day Lion was released I was very fond of the scrollbar in the OS. 狮子被释放的那天,我非常喜欢操作系统中的滚动条。 The browsers already have a slick default scrollbar but I thought how about them Windows users ;). 浏览器已经有一个光滑的默认滚动条,但我想到了他们的Windows用户;)。

It is still under construction but it might help you out: OSX Scroll 它仍在建设中,但它可能会帮助你: OSX Scroll

Based on tinyscrollbar but I made some adjustments. 基于tinyscrollbar但我做了一些调整。 You can enable autohide (like in the OS). 您可以启用自动隐藏(就像在操作系统中一样)。 Just have a look at the source files. 只需看看源文件。

Hope it helps. 希望能帮助到你。

This is an old question.. but maybe someone is still interested in my version: 这是一个老问题..但也许有人仍然对我的版本感兴趣:

Source: https://github.com/pixelass/customScrollBar 资料来源: https //github.com/pixelass/customScrollBar

Example: http://pixelass.github.io/customScrollBar/ 示例: http //pixelass.github.io/customScrollBar/

This plugin actually replicates the scrollbar more precisely than antiscroll or nicescroll.. etc. 这个插件实际上比antiscroll或nicescroll更精确地复制滚动条..等等。

The plugin allows full control over the scrollbars (currently only vertical) and does not require mousewheel.js (as most plugins do) Removing this dependency was the main goal of my version. 该插件允许完全控制滚动条(目前只是垂直),并且不需要mousewheel.js(像大多数插件一样)删除此依赖项是我的版本的主要目标。

It also listens to the scroll event (as antiscroll does). 它还会监听滚动事件(如反垃圾邮件那样)。 The fade-in and hover resize on the scrollbars were missing on all other plugins I found. 滚动条上的淡入和悬停调整大小在我找到的所有其他插件上都丢失了。 My version includes an example to show how to achieve this effect. 我的版本包含一个示例,说明如何实现此效果。

There are optional (pseudo-)event-listeners "scrollEnded" "clicked" which are fired when the user's scroll has ended or when the scroll-bar-thumb is clicked. 有可选的(伪)事件监听器“scrollEnded”“clicked”,当用户的滚动结束或单击滚动条拇指时触发。

This plugin also allows almost any imaginable style and setting of the scrollbar, as click-arrows (up-down-arrows). 此插件还允许几乎任何可以想象的样式和滚动条设置,如点击箭头(上下箭头)。

Alpha Α

This is still alpha (time of posting) but development will continue as time passes. 这仍然是alpha(发布时间),但随着时间的推移,开发将继续。

Use my plugin: scrollYou 使用我的插件: scrollYou

It uses a simple approach to make the scroll inside the own element. 它使用一种简单的方法在自己的元素内部进行滚动。 So you dont have to add more elements to make it roll. 因此,您不必添加更多元素以使其滚动。

jScrollPane plus a little bit of modification would do. jScrollPane加上一点修改就行了。

This is a tutorial about it. 是一个关于它的教程。

nanoscrollernicescroller将是平滑滚动的更好选择。

This one has scroll bars like the ones on Mac and is very simple to install. 这个有像Mac上那样的滚动条,安装起来非常简单。 You can basically apply any skin you like with css. 您基本上可以使用css应用任何你喜欢的皮肤。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM