最基本的横行菜单制作

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>NavgationLists</title>
    <style>
    body, nav, ul, li, a {
        margin: 0;
        padding: 0;
    }
    #nav {
        width: 300px;
        height: 35px;
        background-color: #CCC;
        margin: 0 auto;
    }

    #nav ul {
        list-style: none;
    }
    #nav ul li {
        display: block;
        float: left;
        height: 35px;
        line-height: 35px;
        text-align: center;
    }
    #nav ul li a {
        display: block;
        float: left;
        height: 35px;
        text-decoration: none;
        padding: 0 10px;
    }
    #nav ul li a:hover {
        color: #fff;
        background-color: #000;
    }
    </style>
</head>
<body>
<nav id="nav">
    <ul>    
        <li><a href="">Home</a></li>
        <li><a href="">About</a></li>
        <li><a href="">Services</a></li>
        <li><a href="">Contact</a></li>
    </ul>
</nav>
</body>
</html>