HTML5输入类型的颜色:设置没有颜色/删除颜色 [英] HTML5 input type color: set no color / delete color
问题描述
简单的问题:
$ b $(How)是否可以设置< input type =color>的值
在Chrome中选择此类输入时在colorpicker中清空?
编辑:我想将输入值更改为
我认为它不能设置为 transparent
,但您可以使用 value =#colorhex
修改开始颜色。
例如;
< input type =colorvalue =#0000ff>
编辑:看来,当输入 code>有
type =color
总是有一种颜色定义,并且没有办法将该字符串设置为空。
虽然在这里,第二个答案的人说他认为出一个解决方法。
Simple question:
(How) is it possible to set the value of an <input type="color">
to empty in the colorpicker when selecting such an input in Chrome?
Edit: I want to change the input's value to ""
I think it cannot be set to be transparent
, but you can modify the start color with value="#colorhex"
.
For example;
<input type="color" value="#0000ff">
Edit: It seems that when input
has type="color"
there is always a color defined, and there's no way to set that string to empty.
Although here, the guy with second answer says he figured out a workaround.
这篇关于HTML5输入类型的颜色:设置没有颜色/删除颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!