jquery多级菜单效果代码

代码语言:html

所属分类:菜单导航

代码描述:jquery多级菜单效果代码

代码标签: 效果

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

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <style type="text/css">
        html,
        body {
            height: 100%;
            width: 100%;
        }

        * {
            margin: 0;
            padding: 0;
            cursor: default;
        }

        ul,
        li {
            list-style: none;
            position: relative;
        }

        a {
            text-decoration: none;
            color: #333;
            font-size: 14px;
        }

        li {
            min-height: 40px;
        }

        #nav {
            background-color: rgb(238, 238, 238);
            width: 210px;
            height: 100%;
        }

        #nav>ul>li {
            text-align: center;
            transition: 300ms;
        }

        #nav .sublevel {
            display: none;
        }

        #nav a {
            display: inline-block;
            height: 40px;
            line-height: 40px;
            width: 100%;
            border-left: 4px solid transparent;
            box-sizing: border-box;
            transition: 200ms;
        }

        #nav li>a:hover {
            background-color: rgb(0, 150, 136) !important;
            border-left: 4px solid rgb(4, 86, 78) !important;
            color: #fff !important;
        }
    </style>
</head>
<body>
    <div id="nav">
        <ul>
            <li>
                <a href="javascript:void(0)">一级列表</a>
                <ul class="sublevel">
                    <li>
                        <a href="javascript:void(0)">二级列表</a>
                        <ul class="sublevel">
                            <li>
                                <a href="javascript:void(0)">三级列表</a>
                                <ul class="sublevel">
                                    <li>
                                        <a href="javascript:void(0)">四级列表</a>
                                        <ul class="sublevel">
                                            <li>
                                                <a href="javascript:void(0)">五级列表</a>
                                            </li>
                                        </ul>
                                    </li>
                                </ul>
                            </li>
                            <li>
                                <a href="javascript:void(0)">三级列表</a>
                                <ul class="sublevel">
                                    <li>
                                        <a href="javascript:void(0)">四级列表</a>
                                        <ul class="sublevel">
                                            <li>
                                                <a href="javascript:void(0)">五级列表</a>
                                            </li>
                                        </ul>
                                    </li>
                                </ul>
                            </li>
                            <li>
                                <a href="javascript:void(0)">三级列表</a>
                            </li>
                            <li>
                                <a href="javascript:void(0)">三级列表</a>
                            </li>
                            <li>
                                <a href="javascript:void(0)">三级列表</a>
                            </li>
                        </ul>
                    </li>
                </ul>
            </li>
            <li>
                <a href="javascript:void(0)">一级列表</a>
                <ul class="sublevel">
                    <li>
                        <a href="javascript:void(0)">二级列表</a>
                        <ul class="sublevel">
                            <li>
                                <a href="javascript:void(0)">三级列表</a>
                                <ul class="sublevel">
                                    <li>
                                        <a href="javascript:void(0)">四级列表</a>
                                        <ul class="sublevel">
                                            <li>
                                                <a href="javascript:void(0)">五级列表</a>
                                            </li>
                                        </ul>
                                    </li>
                                </ul>
                            </li>
                            <li>
                                <a href="javascript:void(0)">三级列表</a>
                                <ul class="sublevel">
                                    <li>
                                        <a href="javascript:void(0)">四级列表</a>
                                        <ul class="sublevel">
                                            <li>
                                                <a href="javascript:void(0)">五级列表</a>
                                            </li>
                                        </ul>
                                    </li>
                                </ul>
                            </li>
                            <li>
                                <a href=&q.........完整代码请登录后点击上方下载按钮下载查看

网友评论0