多级菜单悬浮下拉效果

代码语言:html

所属分类:菜单导航

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

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">

    <style>
        nav {
            text-align: center;
            width: 100%;
            background: #bebebe;
            padding: 0;
            margin: 0;
            height: 60px;
            position: relative;
        }

        nav ul {
            background: #bebebe;
            list-style: none;
            padding: 0 20px;
            margin: 0;
            height: 60px;

        }


        nav ul li {
            display: inline-block;
        }


        nav ul li a {
            color: #333333;
            display: block;
            padding: 0px 40px;
            text-decoration: none;
            float: left;
            height: 60px;
            line-height: 60px;
        }

        nav ul li:hover {
            background: #333333;
        }


        nav ul li:hover > a {
            color: #FFFFFF;
        }

        nav ul li:hover > ul {
            display: block;
        }

        nav ul ul {
            background: #BEBEBE;
            padding: 0;
            text-align: center;
            display: none;
            width: 100%;
            position: absolute;
            top: 60px;
            left: 0px;
        }
    </style>

</head>.........完整代码请登录后点击上方下载按钮下载查看

网友评论0