网易云(HTML+CSS)(一)

在这里插入图片描述
需要的精灵图地址:https://s2.music.126.net/style/web2/img/frame/topbar.png?1fe3017650c478831bfff5457b733a45

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        a{
            text-decoration: none;
        }
        ul,li{
            list-style: none;
            margin: 0;
            padding: 0;
        }
        .top{
            height          :   70px;
            background-color: #242424;
            margin          :   0 auto;
            box-sizing      :   border-box;
            border-bottom   :   1px solid red;
        }
        .top .topbar{
            width: 1190px;
            height: 69px;
            display: flex;
            justify-content: space-between;
            margin: 0 auto;
            line-height: 69px;
        }
        .topbar-left .logo{
            width: 157px;
            background-image: url(./images/topbar.png);
        }
        .topbar-left .logo a{
            display: block;
            text-indent: -9999px;
        }
        .topbar-left{
            display: flex;
        }
        .topbar-left .topbar-left-list{
            display: flex;
        }
        .topbar-left .topbar-left-list .item{
            margin-left: 10px;
            color: white;
            padding: 0 10px;
        }
        .topbar-left-list .item1{
            position: relative;
        }
        .topbar-left-list .item1::after{
            content: "";
            position: absolute;
            width: 12px;
            height: 7px;
            background: url(./images/topbar.png) -226px 0;
            top: 64px;
            left: 50%;
        }
        .topbar-left-list .item:hover,
        .topbar-left-list .item.active{
            background-color: black;
        }
        .topbar-right{
            display: flex;
            margin-right: 10px;
            align-items: center;
        }
        .topbar-right .item{
            padding: 0 10px;
            color: aliceblue;
        }
        .topbar-right .search{
            width: 158px;
            height: 32px;
            background-color: white;
            margin: auto 0;
            border-radius: 10px;
        }
        .topbar-right .search span{
            background-image: url(./images/topbar.png);
        }
        .topbar-right .author{
            width: 90px;
            height: 32px;
            border: 1px solid white;
            line-height: 32px;
            border-radius: 10px;
            margin: 0 10px;
            text-align: center;
        }
        .topbar-right .author a{
            color: #eee;
        }
        .topbar-right .author a:hover{
            color: white;
        }

        .topbar-right .login a{
           display: block;
            color: #eee;
        }
        .topbar-right .login a:hover{
            color: #eee;
        }
        .nav{
            height: 35px;
            line-height: 34px;
            border: 1px solid red;
            background-color: #c20c0c;
            box-sizing: border-box;
        }
        .nav .nav-list{
            margin: 0 auto;
            width: 1033px;
            padding-left: 180px;
            display: flex;
            
        }
        .nav .nav-list a{
            display: block;
            font-size: 14px;
            line-height: 14px;
            color: aliceblue;
            padding: 5px 13px;
            border-radius: 10px;  
            margin: 3px 10px;
        }
    </style>
</head>
<body>
    

    <div class="top">
        <div class="topbar">
            <div class="topbar-left">
                <h1 class="logo">
                    <a href="#">网易云音乐</a>
                </h1>
                <ul class="topbar-left-list">
                    <li class="item item1 active">发现音乐</li>
                    <li class="item">我的音乐</li>
                    <li class="item">关注</li>
                    <li class="item">商城</li>
                    <li class="item">音乐人</li>
                    <li class="item">云推歌</li>
                    <li class="item">下载客户端</li>
                </ul>
            </div>
            <div class="topbar-right">
                <div class="item search"><span></span></div>
                <div class="item author"><a href="#">创作者中心</a></div>
                <div class="item login"><a href="#">登录</a></div>
            </div>
        </div>
    </div>
    <div class = "nav">
        <ul class="nav-list">
            <li><a href="#">发现音乐</a></li>
            <li><a href="#">排行榜  </a></li>
            <li><a href="#">歌单    </a></li>
            <li><a href="#">主播电台</a></li>
            <li><a href="#">歌手    </a></li>
            <li><a href="#">新碟上架</a> </li>
        </ul>
    </div>



</body>
</html>

  • 10
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

coder_gaozhiwei

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值