tone.js+keyboard.js实现一个虚拟midi钢琴演奏合成器效果代码
代码语言:html
所属分类:多媒体
代码描述:tone.js+keyboard.js实现一个虚拟midi钢琴演奏合成器效果代码
代码标签: tone keyboard midi 合成器 钢琴
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/normalize.css">
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/material-design-iconic-font.css">
<style>
body {
background: #F752B0;
font-family: "Roboto", arial;
}
h1 {
color: #FFFFFF;
font-size: 36px;
font-weight: 400;
text-align: center;
margin-top: 4em;
}
@media screen and (min-width: 568px) {
h1 {
display: none;
margin-top: 0;
}
}
.icon {
margin: 2em auto;
width: 50px;
height: 50px;
}
@media screen and (min-width: 375px) {
.icon {
left: 10.5em;
}
}
@media screen and (min-width: 412px) {
.icon {
left: 12em;
}
}
@media screen and (min-width: 568px) {
.icon {
display: none;
}
}
.material-icons.white {
color: #FFFFFF;
font-size: 48px;
text-align: middle;
-webkit-animation: rotate 1.5s infinite linear;
animation: rotate 1.5s infinite linear;
}
@-webkit-keyframes rotate {
from {
transform: rotate(-180deg);
}
to {
transform: rotate(-360deg);
}
}
@keyframes rotate {
from {
transform: rotate(-180deg);
}
to {
transform: rotate(-360deg);
}
}
#wave {
transform: rotate(180deg);
position: absolute;
bottom: 0;
z-index: -1;
}
#test {
margin: auto;
max-width: 1800;
}
.outer-container {
display: none;
}
@media screen and (min-width: 568px) {
.outer-container {
display: block;
margin: 0.5em auto;
height: 19.75em;
width: 31.875em;
background-color: #FF006E;
border-radius: 5px 5px 20px 20px;
}
}
@media screen and (min-width: 768px) {
.outer-container {
margin-top: 10em;
height: 22em;
width: 33.5em;
}
}
.inner-container {
margin: auto;
height: 315px;
width: 495px;
background-color: #1D201F;
border-radius: 5px 5px 20.........完整代码请登录后点击上方下载按钮下载查看
网友评论0