jquery简约挂钟时钟时间效果代码

代码语言:html

所属分类:其他

代码描述:jquery简约挂钟时钟时间效果代码

代码标签: jquery 挂钟 时钟 时间

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

<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <style>
        *, *:before, *:after {
      box-sizing: border-box;
    }
    
    html {
      height:100%;
    }
    
    body {
      background: radial-gradient(center center, circle cover, #c9c2b6, #7a726f);
      background: -moz-radial-gradient(center center, circle cover, #c9c2b6 0%, #7a726f 100%);
      background: -webkit-radial-gradient(center center, circle cover, #c9c2b6 0%, #7a726f 100%);
      font-family: Arial, helvetica, 'sans';
    }
    .clock {
      width:193px;
      height:193px;
      border-radius:50%;
      margin:auto;
      position:absolute;
      top:0; right:0; bottom:0; left:0;
      background:#f0f1e9;
      box-shadow: 0 10px 20px rgba(0,0,0,0.2), inset 0 3px 0 rgba(255,255,255,0.5), inset 0 -4px 0 rgba(0,0,0,0.1), 0 2px 5px rgba(0,0,0,0.2);
      /* background: linear-gradient(top, #f0f1e9, #f0f1e9 100%);*/
    }
    .clock::before {
      content:'';
      width:130px;
      height:130px;
      position:absolute;
      margin:auto;
      top:0; right:0; bottom:0; left:0;
      border-radius:50%;
      background: -webkit-linear-gradient(top, #e9eae2, #f5f5ec 100%);
      background: -moz-linear-gradient(top, #e9eae2, #f5f5ec 100%);
      background: linear-gradient(top, #e9eae2, #f5f5ec 100%);
    }
    
    .numbers, clockwise {
      width:100%;
      height:100%;
      border-radius:50%;
    }
    
    .numbers ul {
      list-style:none;
    }
    
    .numbers ul li {
      position:absolute;
      width:1.5em;
      height:1.5em;
      text-align:center;
      line-height:1.5em;
      font-size:1.3em;
      color:#a5a595;
    }
    
    .numbers ul li:first-child {
      top:0;
      left:50%;
      margin-left:-0.75em;
    }
    .numbers ul li:nth-child(2){
      top:50%;
      right:0;
      margin-top:-0.75em;
    }
    .numbers ul li:nth-child(3){
      left:50%;
      bottom:0;
      margin-left:-0.75em;
    }
    .numbers ul li:last-child{
      top:50%;
      left:0;
      margin-top:-0.75em;
    }
    
    .clockwise .center, .support {
      position:absolute;
      width:10px;
      height:10px;
      border-radius:50%;
      background: radial-gradient(center center, circle , #ffffff, #837874 97%, #b4b2aa 100%);
      background: -moz-radial-gradient(center center, circle,#ffffff, #837874 97%, #b4b2aa 100%);
      background: -webkit-radial-gradient(center center, circle , #ffffff, #837874 97%, #b4b2aa 100%);
      background-position:50% -12px;
      box-shadow: 0 3px 5px rgba(0,0,0,0.3);
    }
    
    .clockwise .center {
      left:50%; margin-left:-5px;
      top:50%; margin-top:-5px;
      z-index:5;
    }
    
    .support {
      margin:auto;
      top:-260px; right:0; bottom:0; left:0;
      box-shadow: 0 5px 5px rgba(0,0,0,0.4), 0 -1px 2px rgba(0,0,0,0.3);
    }
    
    .support::before {
      content:'';
      width:4px;
      height:100px;
      background:#fff;
      position:absolute;
      z-index:-1;
      transform:rotate(38deg);
      transform-origin:50% 0%;
      top:5px;
      left:3px;
      background: linear-gradient(left, #f3f3f3, #fff);
      box-shadow: 4px 3px 3px rgba(0,0,0,0.2), inset 1px 0 4px rgba(0,0,0,0.2);
    }
    .support::after {
      content:'';
      width:4px;
      height:100px;
      background:#fff;
      position:absolute;
      z-index:-1;
      transform:rotate(-38deg);
      transform-origin:50% 0%;
      top:5px;
      left:1px;
      background: linear-gradient(left, #f3f3f3, #fff);
      box-shadow: -2px 3px 3px rgba(0,0,0,0.2), inset 1px 0 4px rgba(0,0,0,0.2);
    }
    
    [class*="hand-"] {
      border-radius: 100% 100% 5px 5px;
      box-shadow: 0 0 0.5em rgba(black,0.2);
      left: 50%;
      position: absolute;
      top: 50%;
      z-index: 4;
      box-shadow:0 5px 5px rgba(0,0,0,0.3);
    }
    .hand-second {
      width: 2px;
      top: 18px;
      height: 78px;
      background:#f16e54;
        transform-origin: 50% 100%;
    }
    
    .hand-minute {
      width: 6px;
      top:26px;
      margin-left:-3px;
      height: 88px;
      background:#68645b.........完整代码请登录后点击上方下载按钮下载查看

网友评论0