直接上代码:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <style type="text/css">
            body {
                font-family: Arial;
                font-size: 16px;
            }
            
            dl {
                width: 300px;
            }
            
            dl,
            dd {
                margin: 0;
            }
            
            dt {
                background-color: #ae8758;
                background-image: url(images/201207.png);
                background-repeat: no-repeat;
                background-position: 5px 13px;
                font-size: 18px;
                padding: 5px 5px 5px 20px;
                margin: 2px;
                height: 29px;
                line-height: 28px;
            }
            
            dt a {
                color: #FFF;
                text-decoration: none;
            }
            
            dd a {
                color: #000;
            }
            
            ul {
                list-style: none;
                padding: 5px 5px 5px 20px;
                margin: 0;
            }
            
            li {
                line-height: 24px;
            }
            
            .bg {
                background-position: 5px -16px;
            }
        </style>
        <script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
        <script type="text/javascript">
            $(document).ready(function() {
                $("dd").hide();
                $("dt a").click(function() {
                    $(this).parent().toggleClass("bg");
                    $(this).parent().prevAll("dt").removeClass("bg");
                    $(this).parent().nextAll("dt").removeClass("bg");
                    $(this).parent().next().slideToggle();
                    $(this).parent().prevAll("dd").slideUp("slow");
                    $(this).parent().next().nextAll("dd").slideUp("slow");
                    return false;
                });
            });
        </script>
    </head>

    <body>
        <dl> 
            <dt><a href="#">用户列表</a></dt>
            <dd>
                <ul>
                    <li>
                        <a href="#">会员管理</a>
                    </li>
                    <li>
                        <a href="#">用户管理</a>
                    </li>
                </ul>
            </dd> 
            
            <dt><a href="#">视频上传</a></dt>
            <dd>
                <ul>
                    <li>
                        <a href="#">视频管理</a>
                    </li>
                    <li>
                        <a href="#">视频上传</a>
                    </li>
                </ul>
            </dd> 
            
            <dt><a href="#">信息查询</a></dt>
            <dd>
                <ul>
                    <li>
                        <a href="#">修改信息</a>
                    </li>
                    <li>
                        <a href="#">账单查询</a>
                    </li>
                    <li>
                        <a href="#">退出登录</a>
                    </li>
                </ul>
            </dd>
        </dl>
    </body>
</html>
View Code

相关文章:

  • 2022-01-17
  • 2021-04-11
  • 2021-12-22
  • 2021-11-27
  • 2021-06-26
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-06
  • 2022-01-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案