layui colorpicker颜色选择器效果代码

代码语言:html

所属分类:选择器

代码描述:layui colorpicker颜色选择器效果代码

代码标签: 选择器 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Layui</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/js/layui/css/layui.css">
    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/layui/layui.all.js"></script>
  <!-- 注意:如果你直接复制所有代码到本地,上述css路径需要改成你本地的 -->
</head>
<body>
            
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
  <legend>常规使用</legend>
</fieldset>
 
<div style="margin-left: 30px;">
  <div id="test1"></div>
  <div id="test2" style="margin-left: 30px;"></div>
</div>
 
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
  <legend>表单赋值</legend>
</fieldset>
 
<div style="margin-left: 30px;">
  <form class="layui-form" action="">
    <div class="layui-form-item">
      <div class="layui-input-inline" style="width: 120px;">
        <input type="text" value="" placeholder="请选择颜色" class="layui-input" id="test-form-input">
      </div>
      <div class="layui-inline" style="left: -11px;">
        <div id="test-form"></div>
      </div>
    </div>
  </form>
</div>
 
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
  <legend>RGB / RGBA 色值</legend>
</fieldset>
<div style="margin-left: 30px;">
  <div id="test3"></div>
  <div id="test4" style="margin-left: 30px;"></div>
</div>
 
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
  <legend>透明度选择</legend>
</fieldset>
 
<div style="margin-left: 30px;">
  <div id="test5"></div>
  <div id="test6" style="margin-left: 30px;"></div>
  <div id="test7" style="margin-left: 30px;"></div>
</div>
 
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
  <legend>预定义颜色项</legend>
</fieldset>
 
<div style="margin-left: 30px;">
  <div id="test8"></div>
  <div id="test9" style="margin-left: 30px;"></div>
</div>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
  <legend>全功能和回调的使用</legend>
</fieldset>
<div style="margin-left: 30px;">
  <input type="hidden" name="color" value="" id="test-all-input">
  <div id="test-all"></div>
</div>
 
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
  <legend>颜色框尺寸</legend>
</fiel.........完整代码请登录后点击上方下载按钮下载查看

网友评论0