css导航栏

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        ul{
            margin: 0;
            padding: 0;
            overflow: hidden;
            list-style-type: none;
        }
        li{
            /*float: left;*/
            display: inline;
        }
        a{
            display: block;
            width: 60px;
            background-color: yellow;
        }
    </style>
</head>
<body>
    <div style="margin: 0 auto;text-align: left;width: 980px;height: 50px;background-color: #dddddd;line-height: 50px">
        <ol>
            <li>Home</li>
            <li>News</li>
            <li>Content</li>
            <li>About</li>
        </ol>
    </div>
</body>
</html>

推荐阅读更多精彩内容