jquery柱状时钟时间效果代码

代码语言:html

所属分类:其他

代码描述:jquery柱状时钟时间效果代码

代码标签: jquery 柱状 时钟 时间

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


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

<head>

  <meta charset="UTF-8">
  

  
  
<style>
.center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#bar-clock .hour, #bar-clock .minutes, #bar-clock .seconds {
  background: #F6F6F6;
  width: 40px;
  height: 180px;
  float: left;
  margin-right: 0.5em;
  position: relative;
}
#bar-clock .seconds {
  margin-right: 0;
}
#bar-clock .time {
  display: block;
  background: #CCC;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  transition: height 0.1s linear;
}
#bar-clock #human-time {
  clear: left;
  text-align: center;
  font-size: 2.2em;
  padding-top: 0.3em;
  color: #CCC;
}
</style>




</head>

<body >
  <div class="center">
  <div id="bar-clock">
    <div class="hour"><div class="time"></div></div>
    <div class="minutes"><div class="time"></div></div>
    <div class="seconds"><div class="time"></div></div>
    <div id="human-time"></div>
  </div>
</div>


<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/jquery-3.2.1.min.js"></script>
      <script>
(function() {
  var $hour, $humanTime, $minutes, $seconds, clockHeight, formatTime, getTime, renderTime, t, updateTime;

  $seconds = $('.seconds .time');

  $m.........完整代码请登录后点击上方下载按钮下载查看

网友评论0