knockout实现柱状频谱上下起伏动画效果代码

代码语言:html

所属分类:动画

代码描述:knockout实现柱状频谱上下起伏动画效果代码

代码标签: knockout 柱状 频谱 上下 起伏 动画

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

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

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

  
  
  
<style>
body {
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100vh;
  background-image: linear-gradient(to bottom, #101422, #201022);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-items: center;
  overflow: hidden;
}

.box {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
}
.box .bar {
  width: 1%;
  height: 50px;
  background: #ff00ff;
}
.box .bar:nth-of-type(even) {
  background: #aa00aaaa;
}
.box .bar.bingo {
  background: #00ff00;
}
.box .bar.bingo:nth-of-type(even) {
  background: #00ff00aa;
}
</style>


  
</head>

<body translate="no">
  <div class="box" data-bind="foreach: bars">
	<div class="bar" data-bind="{ style: { height: $data + '%' },css: { bingo: $parent.bingo } }"></div>
</div>
  <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/knockout.3.4.0.js"></script>
      <script type="module">

function bogosort(settings = {}) {
  const self = this;
  //members
  self.elID = settings.elID ?? '';
  self.elToBind.........完整代码请登录后点击上方下载按钮下载查看

网友评论0