美文网首页前端
自定义 树状结构样式图 UI+li

自定义 树状结构样式图 UI+li

作者: 一个健康马 | 来源:发表于2020-05-17 21:17 被阅读0次
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title>Document</title>
    <style>
    *{
      box-sizing: border-box;
      margin: 0;padding: 0;
    }
    *:before,*:after{
      box-sizing: border-box;
    }
    ul,
    li {
      list-style: none;
    }
    .l_tree_container {
      width: 100%;
      height: 100%;
      box-shadow: 0 0 3px #ccc;
      margin: 13px;
      position: relative;
    }
    
    .l_tree {
      width: calc(100%);
      padding-left: 15px;
    }
    .l_tree_branch {
      width: 100%;
      height: 100%;
      display: block;
      padding: 13px;
      position: relative;
    }
    
    
    ul.l_tree:before {
      content: '';
      border-left: 1px dashed #999999;
      height: calc(100% - 24px);
      position: absolute;
      left: 10px;
      top: 0px;
    }
    .l_tree,
    .l_tree_branch {
      position: relative;
    }
    
    .l_tree_branch::after {
      content: '';
      width: 18px;
      height: 0;
      border-bottom: 1px dashed #bbbec1;
      position: absolute;
      right: calc(100% - 10px);
      top: 24px;
      left: -5px;
    }
    </style>
    </head>
    <body>
                <div class=""><button>是</button><button>否</button>
                    <ul class="l_tree">
                            <li class="l_tree_branch"><input/><input/><input/></li>
                            <li class="l_tree_branch"><input/><input/><input/></li>
                            <li class="l_tree_branch"><button>是</button><button>否</button>
                                <ul class="l_tree">
                                        <li class="l_tree_branch"><input/><input/><input/></li>
                                        <li class="l_tree_branch"><input/><input/><input/></li>
                                        <li class="l_tree_branch"><input/><input/><input/></li>
                                </ul>
                            </li>
                            <li class="l_tree_branch"><input/><input/><input/></li>
                    </ul>
                </div>
    </body>
    </html>
    

    相关文章

      网友评论

        本文标题:自定义 树状结构样式图 UI+li

        本文链接:https://www.haomeiwen.com/subject/foleohtx.html