我可以在网页中使用HTML颜色选择器吗? [英] Can I use HTML color picker in my web page ?

查看:94
本文介绍了我可以在网页中使用HTML颜色选择器吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好我在w3scools中搜索并发现了一些调用Html颜色选择器的东西,这就是链接:

https://www.w3schools.com/colors/colors_picker.asp





我没有找到颜色选择器的HTML代码,所以我希望html代码在我的页面中使用这个颜色选择器,所以我希望当用户从颜色选择器中选择任何颜色时,用用户选择的颜色更改页面颜色...任何帮助?



我尝试了什么:



我在google上搜索唯一的结果是w3scools ...在w3schools我没有找到html代码,任何帮助?

hello I search in w3scools and found something thing call Html color picker and this is the link :
https://www.w3schools.com/colors/colors_picker.asp


I did not found the html code of color picker , so I want the html code to use this color picker in my page , so I want when the user pick any color from color picker to change the page color with the color which the user choice ... any help ?

What I have tried:

I search on google and the only result was w3scools ... in w3schools I did not found the html code , any help ?

推荐答案

使用 JQuery MiniColors插件 GitHub - claviska / jquery-minicolors:jQuery MiniColors插件 [ ^ ]


你可以使用input元素在你的页面上有一个颜色选择器。

如下所示

You can use input element to have a color picker on your page.
Something like following
<input type='color' />





注意:检查HTML5的浏览器支持



谢谢:)



Note: Check browser support for HTML5

Thanks :)


这篇关于我可以在网页中使用HTML颜色选择器吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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