媒体播放器 纤薄音轨和音量滑块 oyoslider

  • 源码大小:33.71KB
  • 所需积分:1积分
  • 源码编号:19JP-3680
  • 浏览次数:1033次
  • 最后更新:2023年07月10日
  • 所属栏目:滑块
我要下载
加入收藏
本站默认解压密码:19jp.com 或 19jp_com

简介

oyoslider是一个面向开发人员的轻量级jQuery插件,用于为音频播放器和视频播放器等媒体播放器创建自定义滑块控件(如搜索条和音量滑块)。

如何使用它:

1.在jQuery之后加载oyoslider插件。

  1. <link rel="stylesheet" href="oyoslider.css" />
  2. <script src="/path/to/cdn/jquery.slim.min.js"></script>
  3. <script src="/path/to/oyoslider.js"></script>

2.创建一个新的oyoslider实例。可用参数:

  • 滑块宽度:滑块的宽度
  • 滑块高度:滑块的高度
  • 滑块边框半径:滑块的边界半径属性
  • 轨迹宽度:轨道宽度
  • 轨迹高度:轨道高度
  • 轨迹边界半径:轨道的边界半径特性
  • 拇指宽度:拇指宽度
  • 拇指高度:拇指高度
  • 拇指边框半径:拇指的边界半径特性
  1. // oyoSlider(sliderWidth, sliderHeight, sliderBorderRadius, trackWidth, trackHeight, trackBorderRadius, thumbWidth, thumbHeight, thumbBorderRadius);
  2. mySlider = new oyoSlider();

3.这些API方法使您能够完全控制滑块。

  1. // change the appearance of the slider
  2. mySlider.change(width, height, borderRadius, color);
  3.  
  4. // change the appearance of the track
  5. mySlider.changeTrack(width, height, borderRadius, beforeColor, afterColor);
  6.  
  7. // change the appearance of the thumb
  8. mySlider.changeThumb(width, height, borderRadius, color);
  9.  
  10. // change the color of the slider
  11. mySlider.changeColor(color);
  12.  
  13. // change the color of the track
  14. mySlider.changeTrackColors(beforeColor, afterColor);
  15.  
  16. // change the color of the thumb
  17. mySlider.changeThumbColor(color);
  18.  
  19. // reset all colors
  20. mySlider.resetColors();
  21.  
  22. // enable the slider
  23. mySlider.enable();
  24.  
  25. // disable the slider
  26. mySlider.disable();
  27.  
  28. // set/get the min value
  29. mySlider.min = 0;
  30.  
  31. // set/get the max value
  32. mySlider.max = 25;
  33.  
  34. // set/get the step size
  35. mySlider.step = 1;
  36.  
  37. // set/get the current value
  38. mySlider.vaue = 10;

更新日志:

2022-03-03

  • JS已更新

预览截图