js实现多种可视化音乐播放器效果代码

代码语言:html

所属分类:多媒体

代码描述:js实现多种可视化音乐播放器效果代码

代码标签: 可视化 音乐 播放器 效果

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

<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="description" content="HTML5VisualizationPlayer">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <style>
        html,
body {
    height: 100%;
    margin: 0;
    font-family: arial, "Microsoft YaHei";
    color: #FEFEFE;
}

body {
    background-size: 100% 100%;
    background-position: center center;
    background-repeat: no-repeat;
    background-image: url("//repo.bfw.wiki/bfwrepo/image/604a26e01dd36.png");
    -webkit-transition: all .3s ease-out;
    -moz-transition: all .3s ease-out;
    -ms-transition: all .3s ease-out;
    -o-transition: all .3s ease-out;
    transition: all .3s ease-out;
}

#fileWrapper {
    transition: all 0.5s ease;
}

#fileWrapper:hover {
    opacity: 1 !important;
}

#visualizer_wrapper {
    text-align: center;
}

footer {
    position: fixed;
    bottom: 2px;
    color: #aaa;
}

.play-box {
    position: fixed;
    width: 1000px;
    height: 100px;
    margin: 0 auto;
    left: 0;
    right: 0;
    bottom: 0;
}
@charset "utf-8";
.visualizer-player {
  display: block;
  width: 100%;
  height: 100%;
  background: #272822;
  font-family: arial, "Microsoft YaHei";
  border-radius: 3px;
}
@font-face {
  /*自定义字体-用于绘制字体图标*/
  font-family: 'icomoon';
  src: url('//repo.bfw.wiki/bfwrepo/font/icomoon.eot?lawp0h');
  src: url('//repo.bfw.wiki/bfwrepo/font/icomoon.eot?lawp0h#iefix') format('embedded-opentype'), url('//repo.bfw.wiki/bfwrepo/font/icomoon.ttf?lawp0h') format('truetype'), url('//repo.bfw.wiki/bfwrepo/font/icomoon.woff?lawp0h') format('woff'), url('//repo.bfw.wiki/bfwrepo/font/icomoon.svg?lawp0h#icomoon') format('svg');
  font-weight: normal;
  font-style: normal;
}
.visualizer-player [class^="icon-"],
.visualizer-player [class*=" icon-"] {
  /*统一设置字体图标*/
  /* 使用 !important 是要防止与浏览器扩展的问题,改变字体 */
  font-family: 'icomoon' !important;
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  /* 更好的字体渲染 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.visualizer-player canvas {
  position: absolute;
}
.visualizer-player .visualizer-player-tips {
  position: fixed;
  top: calc(50vh - 40px);
  text-align: center;
  line-height: 30px;
  left: 0;
  right: 0;
  width: 300px;
  height: 30px;
  margin: 0 auto;
  background-color: #272822;
  border-radius: 3px;
  cursor: pointer;
  padding: 5px;
  font-size: 14px;
}
.visualizer-player .player-control {
  position: absolute;
  height: 32px;
  width: 20%;
  top: 40%;
  margin: 0 0.5%;
}
.visualizer-player .player-control i {
  margin: 0 5px;
  font-size: 32px;
  cursor: pointer;
  color: #A7A7A7;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.visualizer-player .player-control i:hover {
  color: #FFFFFF;
}
.visualizer-player .player-control #volumeBox {
  padding-top: 5px;
  display: inline-block;
  width: 35px;
}
.visualizer-player .player-control #volumeBox #volumeBar {
  position: absolute;
  margin: -20px 0 0 40px;
  border-radius: 4px;
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0