js+css实现一个创意数字转盘时钟走动效果代码

代码语言:html

所属分类:其他

代码描述:js+css实现一个创意数字转盘时钟走动效果代码

代码标签: js css 创意 数字 转盘 时钟 走动

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

<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">

<style>
    @import 'https://fonts.googleapis.com/css?family=Work+Sans:100';
body{
  background: radial-gradient(#569, #223);
  height: 100vh;
  overflow: hidden;
  width: 100vw;
}
#codepen-link{
  position: absolute;
  bottom: 30px;
  right: 30px;
  height: 40px;
  width: 40px;
  z-index: 10;
  border-radius: 50%;
  box-sizing: border-box;
  background-image: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/544318/logo.jpg');
  background-position: center center;
  background-size: cover;
  opacity: 0.5;
  transition: all 0.25s;
}
#codepen-link:hover{
    opacity: 0.8;
    box-shadow: 0 0 6px rgba(225,235,255,0.8);
}
#clock{
  border-radius: 50%;
  height: 450px;
  left: calc(50% - 225px);
  position: relative;
  top: calc(50% - 225px);
  width: 450px;
}
#tick-marks{
  height: 100%;
  position: absolute;
  transform: rotate(-90deg);
  width: 100%;
}
.tick-mark{
  border: 1px solid #335;
  border-radius: 50%;
  box-sizing: border-box;
  height: 8px;
  list-style: none;
  position: absolute;
  transition: all 300ms;
  width: 8px;
}
.tick-mark:nth-of-type(5n + 1){
  height: 14px;
  width: 14px;
}
.ticker{
  background: rgba(155, 175, 235, 0.7);
  border: 1px solid #335;
  border-radius: 50%;
  box-sizing: border-box;
  position: absolute;
  transform-origin: center center;
}
.ticker:after{
  border: 1px solid #335;
  bottom: calc(50% + 8px);
  content: "";
  display: bl.........完整代码请登录后点击上方下载按钮下载查看

网友评论0