jQuery.nicescroll 中文API
更新时间:2024-06-04 17:19:01 阅读量: 综合文库 文档下载
jQuery.NiceScroll
一个模仿ios/mobile滚动条风格美化浏览器滚动条的jQuery插件。 NiceScroll初始化声明文档 1、 简单模式,使用默认样式。
$(document).ready(function() {
$(\ });
2、 作为实例和对象返回
var nice = false;
$(document).ready(function() { nice = $(\ });
3、 设置光标颜色
$(document).ready(function() {
$(\ });
4、Div包裹,由两个div组成,第一个是包裹div,第二的才是滚动div
$(document).ready(function() {
$(\ });
5、获取nicescroll对象
var nice = $(\6、隐藏滚动条
$(\
7、检查滚动条大小变化(当窗口大小变化时滚动条跟着变化)
$(\
8、滚动到指定位置
$(\沿X轴滚动 $(\duration); // 沿Y轴滚动
参数一:滚动距离,正数X轴向右滚动、Y轴向下滚动,负数反之。 参数二:滚动持续时间
9、配置参数
$(\
cursorcolor:\设置光标颜色
cursoropacitymin:0, // 设置非活动状态光标透明度,取值范围0-1,默认为0。
cursoropacitymax:1, //设置活动状态光标透明度,取值范围0-1,默认为1。 cursorwidth:\设置光标宽度
cursorborder:\设置光标边框 cursorborderradius:\设置光标圆角,默认5px zindex:\设置滚动条的层数值 scrollspeed:60, //滚动速度,单位秒 mousescrollstep:40, //每次滚动距离
touchbehavior:false, //设置触摸滑动。默认值false hwacceleration:true, //使用硬件加速滚动支持
boxzoom:false, // 设置是否可以放大容器,默认值false
dblclickzoom:true, //双击放大/缩小容器(当boxzoom为true有效)。默认值为true
gesturezoom:true, // 是否支持手指缩进或放大容器(当boxzoom为true并且在touch设备上)
grabcursorenabled:true//设置是否显示为grab(手掌)状态(当touchbehavior=true生效) autohidemode:true, // 怎样隐藏滚动条,可能的值有: true | // 当不滚动隐藏 \仅光标隐藏 false | // 不隐藏
\当光标离开容器时隐藏 \总是隐藏 \仅滚动时显示
background:\设置滚动条背景颜色
iframeautoresize:true, // 当框架载入时自动设置大小 cursorminheight:32, // 设置光标最小大小
preservenativescrolling:true, //设置是否可以使用鼠标滚动, 冒泡鼠标滚动事件 railoffset:false, //添加滚动位移
bouncescroll:false, // 设置是否显示反弹(需要硬件支持) spacebarenabled:true, // 设置是否支持空格键滚动
railpadding: { top:0, right:0, left:0, bottom:0 }, // 设置滚动条距离边框的距离 disableoutline:true, // for chrome browser, disable outline (orange highlight) when selecting a div with nicescroll禁用nicesroll容器选中时chrome浏览器默认产生轮廓线(黄
色高亮)
horizrailenabled:true, //设置nicescroll是否美化水平滚动条 railalign: right, //滚动条水平对齐方式 railvalign: bottom, // 滚动条垂直对齐方式
enabletranslate3d:true, // 设置nicescroll是否可以使用CSS translate属性滚动内容 enablemousewheel:true, // 设置nicescroll是否可以管理鼠标事件 enablekeyboard:true, //设置nicescroll是否可以管理键盘事件 smoothscroll:true, //平滑滚动
sensitiverail:true, // 点击滚动条,滚动到指定位置
enablemouselockapi:true, // 可以使用鼠标扑捉API(在对象拽托存在一些问题)*这一句蒙的can use mouse caption lock API (same issue on object dragging)
cursorfixedheight:false, //设置固定高度游标 hidecursordelay:400, //设置光标隐藏延迟时间
directionlockdeadzone:6, //不懂 dead zone in pixels for direction lock activation
nativeparentscrolling:true, // 不懂detect bottom of content and let parent to scroll, as
native scroll does
enablescrollonselection:true, // 设置选择文本时是否自动滚动 cursordragspeed:0.3, // 设置选中文本时光标滚动速度 rtlmode:\水平滚动条从左方开始
cursordragontouch:false, // touch设备上鼠标展现拽托状态drag cursor in touch /
touchbehavior mode also
oneaxismousemode:\horizontal only content, if false (vertical-only) mousewheel don't scroll horizontally, if value is auto detects two-axis mouse
scriptpath:\
正在阅读:
辽海版品德与社会六年级下册:智慧照亮生活 教案设计207-02
《思想道德修养与法律基础》练习题05-06
行进间转法教案05-12
2018-2019-国防教育演讲稿-介心老师的国防教育情-word版 (2页)06-24
2013年江苏理综(化学)05-13
综合布线考核方案A及评分标准10-28
人教版三年级数学上册应用题归类01-06
提高审议质量应在“研究”上下功夫11-26
斑马打印机使用手册10-10
- 多层物业服务方案
- (审判实务)习惯法与少数民族地区民间纠纷解决问题(孙 潋)
- 人教版新课标六年级下册语文全册教案
- 词语打卡
- photoshop实习报告
- 钢结构设计原理综合测试2
- 2014年期末练习题
- 高中数学中的逆向思维解题方法探讨
- 名师原创 全国通用2014-2015学年高二寒假作业 政治(一)Word版
- 北航《建筑结构检测鉴定与加固》在线作业三
- XX县卫生监督所工程建设项目可行性研究报告
- 小学四年级观察作文经典评语
- 浅谈110KV变电站电气一次设计-程泉焱(1)
- 安全员考试题库
- 国家电网公司变电运维管理规定(试行)
- 义务教育课程标准稿征求意见提纲
- 教学秘书面试技巧
- 钢结构工程施工组织设计
- 水利工程概论论文
- 09届九年级数学第四次模拟试卷
- 中文
- nicescroll
- jQuery
- API
- 公差试题库
- 年产6万吨丙烯酸酯系列产品技改融资投资立项项目可行性研究报告
- 大学物理习题及答案
- 基于PMU的WAMS的研究概述
- 自考02409-桥梁工程,复习试题,有答案。
- 省教育厅关于在全省普通中小学实施学科教学渗透法制教育工作的通
- 2018年重庆市中考数学试题(A卷)及参考答案(word解析版)
- 2014秋浙大《医学社会学》在线作业答案
- 《春风化雨润心田—让学生信服自己》读书心得
- 唐立淇2013年白羊座运势
- 明朝进士列表
- 滨江风景装饰施工组织设计
- 12A-英语5-学生A-动词时态语态主谓一致-综合测试-火艺超
- 物理化学答案——第三章_多组分系统热力学及其在溶液中的应用习
- 进口棉花滑准税计算方法
- 自行车里的数学教案
- 例谈朗读在文言文教学中的重要性
- hypermesh文件操作
- 九年级数学下《圆和圆的位置关系》说课稿北师版
- 中三成功素质