日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

niceScroll相关配置参数

發(fā)布時間:2023/12/10 编程问答 40 豆豆
生活随笔 收集整理的這篇文章主要介紹了 niceScroll相关配置参数 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

好處: 向下兼容ie6,基于jq,部署簡單
壞處: 基于dom的操作,等待dom加載才能負值,動態(tài)引用,長文章操作比較有挑戰(zhàn)性…

$("#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//當光標處于非活動狀態(tài)時更改不透明度(scrollabar“hidden”狀態(tài)),范圍從1到0cursoropacitymax: 1, // change opacity when cursor is active (scrollabar "visible" state), range from 1 to 0//在光標處于活動狀態(tài)時更改不透明度(scrollabar“可見”狀態(tài)),范圍從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//啟用框內(nèi)容縮放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-----僅當指針離開內(nèi)容時隱藏"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//您可以使用鼠標、冒泡鼠標滾輪事件滾動本機可滾動區(qū)域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)啟用內(nèi)容末尾的滾動反彈,就像移動一樣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來滾動內(nèi)容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//方向鎖激活的死區(qū)(像素)nativeparentscrolling: true, // detect bottom of content and let parent to scroll, as native scroll does//檢測內(nèi)容的底部并讓父級滾動,就像本機滾動一樣enablescrollonselection: true, // enable auto-scrolling of content when selection text//在選擇文本時啟用內(nèi)容的自動滾動cursordragspeed: 0.3, // speed of selection when dragged with cursor//使用光標拖動時的選擇速度rtlmode: "auto", // horizontal div scrolling starts at left side//水平div滾動從左側(cè)開始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//它允許在僅水平內(nèi)容上使用鼠標滾輪水平滾動,如果為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更改觀察器,它嘗試在父級或內(nèi)容div更改時調(diào)整大小/隱藏/顯示scrollbarid: false // set a custom ID for nicescroll bars //為nicesroll條設置自定義ID });

總結(jié)

以上是生活随笔為你收集整理的niceScroll相关配置参数的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。