网易云首页菜单栏

本文介绍了网易云音乐网页版首页菜单栏的结构和功能,通过代码展示其实际效果,帮助读者理解网页UI设计和交互体验。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

实例:

代码:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="http://code.jquery.com/jquery-1.4.1.min.js"></script>
    <style>
        body{
            padding:0;
            margin: 0;
        }
        .box{
            width:1200px;
            height: 400px;
            border: 1px solid #000;
            margin:200px auto;
            background: url("https://edu-image.nosdn.127.net/c4f06635e49848ef8325b756d1ad7149.jpg?imageView&quality=100&thumbnail=1205y400") no-repeat;

            position: relative;
        }
        .uls{
            height: 100%;
            width: 200px;
            margin:0;
            padding:0;
            list-style:none ;
            display: inline-block;
            float: left;
            background:rgba(128,132,123,0.8);
        }
        .uls li{
            height:50px;
            line-height:50px;
            text-align: center;
            padding:0 20px;
        }
        .uls li span{
            width:100%;
            display: block;
            border-bottom:1px solid #babac6;
        }
        .uls li:last-child span{
            border-bottom:none;
        }
        .uls li:hover{
            background: rgba(251, 255, 243, 0.8);
        }
        .box .content{
            width:1000px;
            height:400px;
            position: absolute;
            top:0;
            left:200px;
            display: none;
        }
        .box .content1{
            background:red;
        }
        .box .content2{
            background:yellow;
        }
        .box .content3{
            background:blue;
        }
        .box .content4{
            background:green;
        }
        .box .content5{
            background:skyblue;
        }


    </style>
</head>
<body>
    <div class="box">
        <ul class="uls">
            <li>
                <span>1</span>
                <div class="content content1">1</div>
            </li>
            <li>
                <span>2</span>
                <div class="content content2">2</div>
            </li>
            <li>
                <span>3</span>
                <div class="content content3">3</div>
            </li>
            <li>
                <span>4</span>
                <div class="content content4">4</div>
            </li>
            <li>
                <span>5</span>
                <div class="content content5">5</div>
            </li>
        </ul>
    </div>

    <script>
        $(".uls li").hover(
            function(){
                $(".content").eq($(this).index()).css({"display":"inline-block"});
            },
            function(){
                $(".content").eq($(this).index()).css({"display":"none"});
            }
        )
    </script>
</body>
</html>

效果:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值