当前路径: 星河码客 » 插件特效 » Picker —简单的和可定制的颜色选择器

Picker —简单的和可定制的颜色选择器

选择器是一个简单的、容易使用、多功能和可定制的Javascript颜色选择器。使用选择器非常简单:var parent = document.getElementById('parent');var picker = new Picker(parent);parent.onclick = function() { picker.show();};picker.on_done = function(colour) { parent.style.background = colour.rgba().toString();};

click me
也有许多选项,你可以选择。var picker = new Picker({ /* The colour picker's parent */ parent: (parent element), /* Where the colour picker is relative to the parent. Defaults to 'right'. */ orientation: ('left', 'right', 'top', 'bottom', 'centre', 'center'), /* The colour picker's x position relative to the parent. Defaults to 'auto'. */ x: (number), /* The colour picker's y position relative to the parent. Defaults to 'auto'. */ y: (number), /* The colour picker's arrow size. Defaults to 20. */ arrow_size: (number)});你可以定制CSS源文件,或做如下:picker.wrapper.background = '#333';简单!

Picker —简单的和可定制的颜色选择器

在线演示        积分下载        6毛下载        砍两刀下载       

文件目录······
暂无数据
 猜你喜欢 更多»
 工具推荐 更多»