有什么方法可以自定义HTML 5中的颜色选择器? [英] Is there any way to customize the color picker in HTML 5?
本文介绍了有什么方法可以自定义HTML 5中的颜色选择器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用HTML5和CSS3构建网站,并且希望使用HTML5创建一个独特的颜色选择器
I'm building a website with HTML5 and CSS3, and I want to create a unique color picker with HTML5
有什么方法可以自定义拾色器?
Is there any way to customize the color picker?
推荐答案
在Opera中,这是唯一实现 color
元素的浏览器,您可以自定义提供的颜色集数据列表
:
In Opera, the only browser to have implemented the color
element, you can customize the set of colours offered with a datalist
:
<datalist id="greyscale">
<option value="#000000">
<option value="#333333">
<option value="#666666">
<option value="#999999">
<option value="#cccccc">
</datalist>
<fieldset class="col">
<legend>Color element 2</legend>
<label for="excolor2">Color: </label>
<input type="color" id="excolor2" name="excolor2" list="greyscale">
</fieldset>
这篇关于有什么方法可以自定义HTML 5中的颜色选择器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文