$("#thisdiv").niceScroll({cursorcolor:"#424242",// change cursor color in hex// 更改十六進制中的光標顏色cursoropacitymin:0,// change opacity when cursor is inactive (scrollabar "hidden" state), range from 1 to 0//當光標處于非活動狀態時更改不透明度(scrollabar“hidden”狀態),范圍從1到0cursoropacitymax:1,// change opacity when cursor is active (scrollabar "visible" state), range from 1 to 0//在光標處于活動狀態時更改不透明度(scrollabar“可見”狀態),范圍從1到0cursorwidth:"5px",// cursor width in pixel (you can also write "5px")//光標寬度(像素)(您也可以寫入“5px”)cursorborder:"1px solid #fff",// css definition for cursor border//光標邊框的css定義cursorborderradius:"5px",// border radius in pixel for cursor//光標的邊框半徑(以像素為單位)zindex:"auto"|[number],// change z-index for scrollbar div//更改滾動條div的z索引scrollspeed:60,// scrolling speed//滾動速度mousescrollstep:40,// scrolling speed with mouse wheel (pixel)//鼠標滾輪滾動速度(像素)touchbehavior:false,// DEPRECATED!! use "emulatetouch"//已棄用!!使用“emulatetouch”emulatetouch:false,// enable cursor-drag scrolling like touch devices in desktop computer//啟用桌面計算機中類似觸摸設備的光標拖動滾動hwacceleration:true,// use hardware accelerated scroll when supported//在支持時使用硬件加速滾動boxzoom:false,// enable zoom for box content//啟用框內容縮放dblclickzoom:true,// (only when boxzoom=true) zoom activated when double click on box//(僅當boxzoom=true時)雙擊方框時縮放激活gesturezoom:true,// (only when boxzoom=true and with touch devices) zoom activated when pinch out/in on box//(僅當boxzoom=真且使用觸摸設備時)在縮小/縮小框時激活縮放grabcursorenabled:true// (only when touchbehavior=true) display "grab" icon//(僅當touchbehavior=true時)顯示“grab”圖標autohidemode:true,// how hide the scrollbar works, possible values: -----隱藏滾動條的工作方式,可能的值:true|// hide when no scrolling-----不滾動時隱藏"cursor"|// only cursor hidden-----僅隱藏光標false|// do not hide,-----不隱藏"leave"|// hide only if pointer leaves content-----僅當指針離開內容時隱藏"hidden"|// hide always-----始終隱藏"scroll",// show only on scroll-----僅在滾動上顯示background:"",// change css for rail background//更改軌道背景的cssiframeautoresize:true,// autoresize iframe on load event//加載時自動Resize iframe事件cursorminheight:32,// set the minimum cursor height (pixel)//設置最小光標高度(像素)preservenativescrolling:true,// you can scroll native scrollable areas with mouse, bubbling mouse wheel event//您可以使用鼠標、冒泡鼠標滾輪事件滾動本機可滾動區域railoffset:false,// you can add offset top/left for rail position//可以為軌道位置添加上/左偏移bouncescroll:false,// (only hw accell) enable scroll bouncing at the end of content as mobile-like //(僅hw accell)啟用內容末尾的滾動反彈,就像移動一樣spacebarenabled:true,// enable page down scrolling when space bar has pressed//按下空格鍵時啟用向下滾動頁面railpadding:{top:0,right:0,left:0,bottom:0},// set padding for rail bar//設置欄桿的填充disableoutline:true,// for chrome browser, disable outline (orange highlight) when selecting a div with nicescroll//對于chrome瀏覽器,使用NiceSoll選擇div時禁用outline(橙色突出顯示)horizrailenabled:true,// nicescroll can manage horizontal scroll//NiceSoll可以管理水平滾動railalign: right,// alignment of vertical rail//垂直軌道的對齊railvalign: bottom,// alignment of horizontal rail//水平軌道對齊enabletranslate3d:true,// nicescroll can use css translate to scroll content//NiceSoll可以使用css translate來滾動內容enablemousewheel:true,// nicescroll can manage mouse wheel events//NiceSoll可以管理鼠標滾輪事件enablekeyboard:true,// nicescroll can manage keyboard events//NiceSoll可以管理鍵盤事件smoothscroll:true,// scroll with ease movement//輕松滾動sensitiverail:true,// click on rail make a scroll//單擊導軌進行滾動enablemouselockapi:true,// can use mouse caption lock API (same issue on object dragging)//可以使用鼠標標題鎖定API(對象拖動上的問題相同)cursorfixedheight:false,// set fixed height for cursor in pixel//以像素為單位設置光標的固定高度hidecursordelay:400,// set the delay in microseconds to fading out scrollbars//將以微秒為單位的延遲設置為淡出滾動條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,// enable auto-scrolling of content when selection text//在選擇文本時啟用內容的自動滾動cursordragspeed:0.3,// speed of selection when dragged with cursor//使用光標拖動時的選擇速度rtlmode:"auto",// horizontal div scrolling starts at left side//水平div滾動從左側開始cursordragontouch:false,// drag cursor in touch / touchbehavior mode also//也在觸摸/觸摸行為模式下拖動光標oneaxismousemode:"auto",// it permits horizontal scrolling with mousewheel on horizontal only content, if false (vertical-only) mousewheel don't scroll horizontally, if value is auto detects two-axis mouse//它允許在僅水平內容上使用鼠標滾輪水平滾動,如果為false(僅垂直),鼠標滾輪不水平滾動,如果值為auto,則檢測到兩軸鼠標scriptpath:""// define custom path for boxmode icons ("" => same script path)//定義boxmode圖標的自定義路徑(”=>相同的腳本路徑)preventmultitouchscrolling:true// prevent scrolling on multitouch events//防止在多點觸控事件上滾動disablemutationobserver:false// force MutationObserver disabled,//強制MutationObserver已禁用,enableobserver:true// enable DOM changing observer, it tries to resize/hide/show when parent or content div had changed//啟用DOM更改觀察器,它嘗試在父級或內容div更改時調整大小/隱藏/顯示scrollbarid:false// set a custom ID for nicescroll bars //為nicesroll條設置自定義ID});