1.效果:

Layui tree 下拉菜单树的实例代码

2.html 代码:

<!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 rel="stylesheet" href="static/layui/css/layui.css" rel="external nofollow" media="all">
 <!-- 注意:如果你直接复制所有代码到本地,上述css路径需要改成你本地的 -->
 <style type="text/css">
 .downpanel .layui-select-title span {
  line-height: 38px;
 }

 /*继承父类颜色*/
 .downpanel dl dd:hover {
  background-color: inherit;
 }
 </style>
 <style type="text/css">
 body {
  height: 100%;
  width: 100%;
  background-size: cover;
  margin: 0 auto;
 }
 td {
  font-size: 12px !important;
 }

 .layui-form-checkbox span {
  height: 30px;
 }
 .layui-field-title {
  border-top: 1px solid white;
 }
 table {
  width: 100% !important;
 }

 </style>

</head>
<body>
<form class="layui-form">
 <div class="layui-form-item">
 <label class="layui-form-label">文章栏目</label>
 <div class="layui-input-inline">
  <div class="layui-unselect layui-form-select downpanel">
  <div class="layui-select-title">
   <span class="layui-input layui-unselect" id="treeclass">选择栏目</span>
   <input type="hidden" name="selectID" value="0">
   <i class="layui-edge"></i>
  </div>
  <dl class="layui-anim layui-anim-upbit">
   <dd>
   <ul id="classtree"></ul>
   </dd>
  </dl>
  </div>
 </div>
 </div>
</form>


<script src="/UploadFiles/2021-04-02/layui.js">

以上这篇Layui tree 下拉菜单树的实例代码就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持。

华山资源网 Design By www.eoogi.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
华山资源网 Design By www.eoogi.com