css+js实现带指针罗马数学数字时钟显示时间走动效果带啊

代码语言:html

所属分类:其他

代码描述:css+js实现带指针罗马数学数字时钟显示时间走动效果带啊

代码标签: css 罗马 数字 时钟 时间

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

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">



    <style>
        .clock {
          border-radius: 50%;
          width: 400px;
          height: 400px;
          position: relative;
          display: flex;
          justify-content: center;
          align-items: center;
        }
        .clock::before {
          content: '';
          width: 308px;
          height: 308px;
          background: radial-gradient(at -5% -5%, rgba(255, 255, 255, 0.2) 40%, rgba(255, 255, 255, 0) 40%), radial-gradient(at center, #555, #555 4px, rgba(85, 85, 85, 0) 5px);
          border-radius: 50%;
          background-size: 280%, 100%;
          z-index: 1;
          position: absolute;
        }
        .clock:after {
          content: '';
          width: 400px;
          height: 400px;
          position: absolute;
          background: radial-gradient(at center, #ddd 146px, #ccc 156px, rgba(221, 221, 221, 0) 157px), radial-gradient(at center, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999, #333, #999);
          border-radius: 200px;
          z-index: -1;
        }
        .clock .seconds,
        .clock .minutes,
        .clock .hours {
          background: #000;
          position: absolute;
          bottom: 50%;
          transform-origin: bottom;
          border-radius: 60%;
          z-index: 2;
        }
        .clock .seconds {
          width: 2px;
          height: 36%;
          background: #f00;
        }
        .clock .minutes {
          width: 3px;
          height: 30%;
        }
        .clock .hours {
          width: 5px;
          height: 24%;
        }
        .clock span {
          position: absolute;
          font-size: 24px;
          font-weight: 500;
          letter-spacing: 1px;
          color: #fff;
          text-shadow: 0px 0px 3px #000;
        }
        .clock span:nth-of-type(12) {
          top: 2%;
        }
        .clock span:nth-of-type(1) {
          right: 27%;
    .........完整代码请登录后点击上方下载按钮下载查看

网友评论0