仿新浪导航样式

效果

仿新浪导航样式

代码如下

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>新浪导航</title>
    <style>
        * {
          margin: 0;
          padding: 0;
        }
        .nav {
            height: 41px;
            background-color: #FCFCFC;
            border-top: 4px solid #FF8500;
            border-bottom: 1px solid #EDEEF0;
        }
        .nav a {
            display: inline-block;/* 块,行内元素转为行内块 */
            height: 41px;
            /*background-color: green;*/
            line-height: 41px;
            padding: 0px 20px;
            text-decoration: none;
            color: #4C4C4C;
            font-size: 12px;
        }
        .nav a:hover {
            /* style */
            background-color: #CCC;
        }
        
    </style>
</head>
<body>
    <div class="nav">
        <a href="#">设为首页</a>
        <a href="#">手机新浪网</a>
        <a href="#">移动客户端</a>
        <a href="#">博客</a>
        <a href="#">微博</a>
        <a href="#">关注我</a>
    </div>
</body>
</html>
------本页内容已结束,喜欢请分享------

感谢您的来访,获取更多精彩文章请收藏本站。

© 版权声明
THE END
喜欢就支持一下吧
点赞9 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容