HTML5输入类型的颜色:设置没有颜色/删除颜色 [英] HTML5 input type color: set no color / delete color

查看:168
本文介绍了HTML5输入类型的颜色:设置没有颜色/删除颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简单的问题:
$ b $(How)是否可以设置< input type =color>的值在Chrome中选择此类输入时在colorpicker中清空?



编辑:我想将输入值更改为

解决方案

我认为它不能设置为 transparent ,但您可以使用 value =#colorhex修改开始颜色。



例如;

 < input type =colorvalue =#0000ff> 

http://jsfiddle.net/j3hZB/4/

编辑:看来,当输入 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">

http://jsfiddle.net/j3hZB/4/

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆