vue 实现多级树形可折叠菜单效果代码

代码语言:html

所属分类:菜单导航

代码描述:vue 实现多级树形可折叠菜单效果代码

代码标签: 树形 可折叠 菜单 效果

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

<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="UTF-8">


<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/font-awesome-4.7.0/css/font-awesome.min.css">

    <style>
        *, *::after, *::before {
            box-sizing: border-box;
        }

        body {
            color: #fff;
            background: #949c4e;
            background: linear-gradient(
            115deg,
            rgba(86, 216, 228, 1) 10%,
            rgba(159, 1, 234, 1) 90%
            );
            font-family: -apple-system, BlinkMacSystemFont,"Segoe UI", Roboto,
            Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial,
            sans-serif;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            overflow: hidden;
        }

        html,
        body,
        .container {
            min-height: 100vh;
        }

        .center {
            display: -webkit-box;
            display: flex;
            -webkit-box-pack: center;
            justify-content: center;
            -webkit-box-align: center;
            align-items: center;
        }

        ol, ul {
            list-style: none;
            padding: 0px;
        }

        a {
            color: #a0f6aa;
            text-decoration: none;
        }

        h1 {
            text-align: center;
            width: 90%;
            margin: 2em auto 0;
            color: #507b55;
            font-weight: bold;
        }

        .cd-accordion-menu {
            width: 90%;
            max-width: 600px;
            margin: 4em auto;
            background: rgba(0, 0, 0, 0.8);
            box-shadow: 0 4px 6px 0 rgba(0, 0, 0, 0.3);
        }

        .cd-accordion-menu li {
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }

        .cd-accordion-menu li span {
            float: right;
        }

        .cd-accordion-menu label, .cd-accordion-menu a {
            position: relative;
            display: block;
            padding: 18px 18px 18px 45px;
            box-shadow: inset 0 -1px #000;
            color: #ffffff;
        }
        .no-touch .cd-accordion-menu label:hover,
        .no-touch .cd-accordion-menu a:hover {
            background: #52565d;
        }
        .cd-accordion-menu label::before,
        .cd-accordion-menu label::after,
        .cd-accordion-menu a::after {
            /* icons */
            content: '';
            display: inline-block;
            width: 16px;
            height: 16px;
            position: absolute;
            top: 50%;
            -webkit-transform: translateY(-50%);
            transform: translateY(-50%);
        }
        .cd-accordion-menu label {
            cursor: pointer;
        }

        .cd-accordion-menu label span {
            float: right;
            color: #828282;
        }

        .cd-accordion-menu li.file > label::before {
            content: "\f15b";
        }
        .cd-accordion-menu li.folder > label::before {
            content: "\f054";
        }

        .cd-accordion-menu li.file > label::before {
            content: "\f15b";
        }
        .cd-accordion-menu li.add > label::before {
            content: "\f067";
        }


        .cd-accordion-menu label::before {
            /* arrow icon */
            font: normal normal normal 14px/1 FontAwesome;
            left: 18px;
            -webkit-transform: translateY(-50%);
            transform: translateY(-50%);
            -webkit-transition: -webkit-transform 0.3s;
            transition: -webkit-transform 0.3s;
            transition: transform 0.3s;
            transition: transform 0.3s, -webkit-transform 0.3s;
        }
        .cd-accordion-menu label.open::before {
            -webkit-transform: translateY(-25%) rotate(90deg);
            tran.........完整代码请登录后点击上方下载按钮下载查看

网友评论0