web299.com
全部
教育
语言/资格考试
法律
互联网
政务民生
Word模板
Excel模板
PPT模板
网页特效
小程序模板
网站模板
首页
教育
语言/资格考试
法律
互联网
政务民生
Word模板
Excel模板
PPT模板
网页特效
小程序模板
网站模板
当前位置:
首页
>
网页特效
>
颜色拾取器
Bootstrap颜色拾取器插件
分类:
颜色拾取器
日期:
2024-05-14
点击(4)
评论(0)
演 示
免费下载
简介
Bootstrap Colorpicker是一款基于Bootstrap的jquery颜色选择器插件。该jquery颜色选择器插件允许你选取颜色,它提供多种颜色格式:hex, rgb,rgba,hsl,hsla,并提供功能强大的API来控制颜色拾取器。 #### 安装 ------------ 可以通过npm或Yarn来安装bootstrap-colorpicker.js颜色拾取器插件。 ```html npm install bootstrap-colorpicker yarn add bootstrap-colorpicker ``` #### 使用方法 ------------ 在页面中引入bootstrap,jquery和bootstrap-colorpicker.css以及bootstrap-colorpicker.js文件。 ```html
``` #### HTML结构 使用bootstrap-colorpicker.js颜色拾取器插件最基本的HTML结构如下: ```html
``` #### 配置参数 ------------ 该Bootstrap颜色选择器插件的默认配置参数如下: ```html // horizontal mode layout ? horizontal: false, // forces to show the colorpicker as an inline element inline: false, // forces a color color: false, // forces a format format: false, // children input selector input: 'input', // container selector container: false, // children component selector component: '.add-on, .input-group-addon', // Vertical sliders configuration sliders: { saturation: { maxLeft: 100, maxTop: 100, callLeft: 'setSaturation', callTop: 'setBrightness' }, hue: { maxLeft: 0, maxTop: 100, callLeft: false, callTop: 'setHue' }, alpha: { maxLeft: 0, maxTop: 100, callLeft: false, callTop: 'setAlpha' } }, // Horizontal sliders configuration slidersHorz: { saturation: { maxLeft: 100, maxTop: 100, callLeft: 'setSaturation', callTop: 'setBrightness' }, hue: { maxLeft: 100, maxTop: 0, callLeft: 'setHue', callTop: false }, alpha: { maxLeft: 100, maxTop: 0, callLeft: 'setAlpha', callTop: false } }, // Customizes the default colorpicker HTML template. template: '
' + '
' + '
' + '
' + '
' + '
' + '
', // By default, the colorpicker is aligned to the right of the input. // If you need to switch it to the left, set align to 'left'. align: 'right', // Adds this class to the colorpicker widget. customClass: null, colorSelectors: null ``` bootstrap-colorpicker.js颜色选择器插件的github地址为:[https://github.com/farbelous/bootstrap-colorpicker](bootstrap-colorpicker.js颜色选择器插件的github地址为:https://github.com/farbelous/bootstrap-colorpicker "https://github.com/farbelous/bootstrap-colorpicker")
相关推荐
html5浪漫粒子表白文字特效
SlidesJS幻灯片特效
html5瀑布流相册特效
css3 svg实现的情人节表白鲜花动画特效
t-scroll.js基于ES6的DOM元素,过渡动画库插件
纯js写省市区三级联动效果
广告
广告