歌单列表


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #box{
            width: 400px;
            background-color: gray;
            margin:300px auto;
        }
        #title{
            width: 360px;
            padding-left:40px;
            padding-top: 5px;
            font-size:20px;
            background-color: #D2D6DA;
        }
        #list {
            margin-top: 2px;
            list-style: none;
            display: none;
            font-size: 20px;
            background-color: #E9EDF3;
            padding-left: 0;
        }
        li{padding-left: 40px}
        #tri
        {
            width: 0;
            height:0;
            border-top:o;
            border-bottom:6px solid black;
            border-left:6px solid transparent;
            border-right:6px solid transparent;
            float: right;
            margin-top:9px;
        }
    </style>
</head>
<body>
   <script>
       window.οnlοad=function () {
           var title1=document.getElementById("title")
           var tri1=document.getElementById("tri")
           var list1=document.getElementById("list")
           title1.οnclick=run;
           tri1.οnclick=run;
           function run(){
               if(list1.style.display=="block")
               {list1.style.display="none";
                   tri1.style.transform="rotate(180deg)";
               }
               else
               {
                   list1.style.display="block";
                   tri1.style.transform="rotate(0deg)";
               }
           }
           var items=document.getElementsByTagName("li")
           for(var i=0;i<items.length;i++) {
               items[i].onmouseover = function () {
                   this.style.background = "white";
                   this.style.textDecoration = "underline";
               }
               items[i].onmouseout = function () {
                   this.style.background = "#e9edf3";
                   this.style.textDecoration = "none";
               }

           }
           }
   </script>
<div id="box">
    <div id="title">播放列表<div id="tri"></div></div>
<ul id="list">
    <li>玩爱之徒-蔡依林</li>
    <li>原谅我就是这样的女生-戴佩妮</li>
    <li>猜不透-丁当</li>
    <li>自导自演-周杰伦</li>
    <li>浪漫窝-弦子</li>
    <li>流年-王菲</li>
</ul>
</div>
</body>
</html>

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值