From 68b741af74673185d17f4a226cadbd4ad0ae929c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A7=89?= Date: Sun, 1 Oct 2023 03:57:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/music.js | 45 +++++++++++++++------------------------------ 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/public/music.js b/public/music.js index bb48f63..5dac08e 100644 --- a/public/music.js +++ b/public/music.js @@ -35,36 +35,21 @@ export default class MusicList { } } //// 写入 css 样式到 head - //const style = document.createElement('style') - //style.innerText = ` - // ul.music-list { - // width: 600px; - // height: 100%; - // overflow: auto; - // background-color: #ffffff; - // box-shadow: 0 0 15px #ccc; - // border-radius: 5px; - // padding: 1rem 2rem; - // margin: 1rem; - // } - // ul.music-list > li { - // list-style: none; - // padding: 10px; - // border-bottom: 1px solid #ccc; - // cursor: pointer; - // } - // ul.music-list > li:hover { - // background-color: #ddd; - // } - // ul.music-list > li > button { - // margin-right: 10px; - // } - // ul.music-list > li > button:hover { - // background-color: #ccc; - // } - // ul.music-list > li - // ` - //document.head.appendChild(style) + const style = document.createElement('style') + style.innerText = ` + ul.music-list > li { + cursor: pointer; + } + ul.music-list > li > button { + margin-left: 10px; + border: none; + cursor: pointer; + } + ul.music-list > li > button:hover { + background-color: #ccc; + } + ` + document.head.appendChild(style) document.body.appendChild(input) } // 添加回调函数