react+mediaelementandplayer插件实现带播放列表的音乐播放器代码

代码语言:html

所属分类:多媒体

代码描述:react+mediaelementandplayer插件实现带播放列表的音乐播放器代码

代码标签: react mediaelementandplayer 插件 实现 播放 列表 音乐 播放器 代码

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">

<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/all.5.6.1.css">
    <link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Rubik:300,400,500,700&amp;display=swap'>
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/mediaelementplayer.min.css">
<style>
    body {
  font-family: "Rubik", sans-serif;
  color: #071739;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background: #000;
}
body h1 {
  font-size: 36px;
  margin-bottom: 0;
}
body .card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  max-width: 371px;
  padding: 0 5px;
  margin-top: 40px;
  border-radius: 20px;
  color: #fff;
  font-weight: 100;
  box-shadow: 0px 0px 70px 0px #274684;
  background: #071739;
  overflow: hidden;
}
body .card .current-song {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 20px 0px;
  border-radius: 20px;
  color: #071739;
  background: #fff;
}
body .card .current-song audio {
  display: none;
}
body .card .current-song .img-wrap {
  position: relative;
  margin: 0 auto;
  width: 270px;
  height: 200px;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0px 10px 40px 0px rgba(39, 70, 132, 0.7);
}
body .card .current-song .img-wrap img {
  width: auto;
  height: 100%;
}
body .card .current-song .song-name {
  margin-top: 30px;
  font-size: 22px;
}
body .card .current-song .song-autor {
  color: #709fdc;
}
body .card .current-song .time {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  width: 240px;
}
body .card .current-song #timeline {
  position: relative;
  margin: 0 auto;
  width: 240px;
  height: 5px;
  background: #709fdc;
  border-radius: 5px;
  cursor: pointer;
}
body .card .current-song #timeline:hover .hover-playhead {
  opacity: 1;
}
body .card .current-song #timeline:hover .hover-playhead::before {
  opacity: 1;
}
body .card .current-song #timeline:hover .hover-playhead::after {
  opacity: 1;
}
body .card .current-song #timeline #playhead {
  position: relative;
  z-index: 2;
  width: 0;
  height: 5px;
  border-radius: 5px;
  background: #071739;
}
body .card .current-song #timeline .hover-playhead {
  position: absolute;
  z-index: 1;
  top: 0;
  width: 0;
  height: 5px;
  opacity: 0;
  border-radius: 5px;
  background: #274684;
  transition: opacity 0.3s;
}
body .card .current-song #timeline .hover-playhead::before {
  opacity: 0;
  content: attr(data-content);
  display: block;
  position: absolute;
  top: -30px;
  right: -23px;
  width: 40px;
  padding: 3px;
  text-align: center;
  color: white;
  background: #274684;
  border-r.........完整代码请登录后点击上方下载按钮下载查看

网友评论0