css+js实现卡西欧怀旧经典手表显示当前时间走动效果代码

代码语言:html

所属分类:布局界面

代码描述:css+js实现卡西欧怀旧经典手表显示当前时间走动效果代码

代码标签: css js 卡西欧 怀旧 经典 手表 显示 当前 时间 走动

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

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

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


  <title>卡西欧 F-91W(怀旧回忆振动)</title>

  <meta name="viewport" content="width=device-width, initial-scale=1">
  
  
  
<style>
:root {
  --bg-primary: #4f4c7e;
  --bg-secondary: #777ab8;
}
@import url("https://fonts.cdnfonts.com/css/alarm-clock");

@import url("https://fonts.googleapis.com/css2?family=Gidugu&family=Michroma&display=swap");
@font-face {
  font-family: "DSEG7 Classic";
  src: url(//repo.bfw.wiki/bfwrepo/font/dseg7-bold.woff2)
      format("woff2"),
    url(//repo.bfw.wiki/bfwrepo/font/dseg7-bold.woff) format("woff");
  font-display: swap;
}

@font-face {
  font-family: "DSEG14 Classic";
  src: url(//repo.bfw.wiki/bfwrepo/font//dseg14-bold.woff2)
      format("woff2"),
    url(//repo.bfw.wiki/bfwrepo/font/dseg14-bold.woff) format("woff");
  font-display: swap;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "DSEG14 Classic", "alarm clock", sans-serif;
  font-size: 16px;
  border: none;
  outline: 0;
}
body {
  height: 100vh;
  background-color: rgb(122, 109, 172);
  background-image: repeating-linear-gradient(
    to top,
    var(--bg-primary) 0.42%,
    var(--bg-secondary) 0.84%,
    var(--bg-primary) 2.52%
  );
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
}
body > div {
  display: grid;
  place-items: center;
  gap: 50px;
}
.highlight {
  fill: #fff;
}
#watch-elements-container {
  position: relative;
}
#shine {
  background-image: linear-gradient(
    40deg,
    #fff0 15%,
    #fff2 30%,
    #fff6 50%,
    #fff2 70%,
    #fff0 85%
  );
  position: absolute;
  height: 198px;
  width: 227px;
  border-radius: 39px;
  bottom: 63px;
  z-index: 4;
}
#screen {
  position: absolute;
  bottom: 115px;
  right: 74px;
  height: 84px;
  width: 172px;
  border-radius: 9px;
  overflow: hidden;
  color: rgba(0, 0, 0, 0.61);
  font-size: 2rem;
  letter-spacing: -1px;
  line-height: 24px;
  word-spacing: 10px;
  display: flex;
  flex-wrap: wrap;
  row-gap: 10px;
  justify-content: space-between;
  padding: 5px;
  z-index: 3;
}
p {
  font-size: 2.25rem;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: baseline;
}
span {
  font-size: 0.8rem;
  font-family: sans-serif;
}
#casio {
  z-index: 2;
}
small {
  font-size: 1.5rem;
}
#day-name,
#day-date {
  font-size: 17px;
  font-family: "DSEG14 Classic", "alarm clock", sans-serif;
}
#format {
  display: flex;
  align-items: end;
}
</style>

  
  
  
</head>

<body >

<div id="watch-elements-container">
  <div id="shine"></div>
  <div id="screen">
  </div>
  <svg id="casio" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1271 1311" width="320">
    <defs>
      <radialGradient id="Dégradé_sans_nom_3" data-name="Dégradé sans nom 3" cx="635" cy="687" fx="260.1751499985994" r="374.83" gradientUnits="userSpaceOnUse">
        <stop offset="0.28" stop-color="lime"></stop>
        <stop offset="0.46" stop-color="#00b200" stop-opacity="0.7"></stop>
        <stop offset="0.65" stop-color="#006700" stop-opacity="0.4"></stop>
        <stop offset="0.82" stop-color="#002f00" stop-opacity="0.19"></stop>
        <stop offset="0.94" stop-color="#000d00" stop-opacity="0.05"></stop>
        <stop offset="1" stop-opacity="0"></stop>
      </radialGradient>
    </defs>
    <g id="Calque">
      <g id="Contours">
        <path id="btn3" d="M1226,777h39.08a5.92,5.92,0,0,1,5.92,5.92v58.16a5.92,5.92,0,0,1-5.92,5.92H1226a0,0,0,0,1,0,0V777A0,0,0,0,1,1226,777Z" style="fill:#c4c4c4" class=""></path>
        <path id="btn2" d="M2593.5,686h39.08a5.92,5.92,0,0,1,5.92,5.92v58.16a5.92,5.92,0,0,1-5.92,5.92H2593.5a0,0,0,0,1,0,0V686A0,0,0,0,1,2593.5,686Z" transform="translate(2638.5 1533) rotate(180)" style="fill:#c4c4c4" class=""></path>
        <path id="btn1" d="M2593.5,386h39.08a5.92,5.92,0,0,1,5.92,5.92v58.16a5.92,5.92,0,0,1-5.92,5.92H2593.5a0,0,0,0,1,0,0V386A0,0,0,0,1,2593.5,386Z" transform="translate(2638.5 933) rotate(180)" style="fill:#c4c4c4" class=""></path>
        <path id="Contour_1" data-name="Contour 1" d="M2855-91h752c16,0,17,13,17,13l35,112c5,14,6,13,6,13l122,206a23,23,0,0,0,6,7l25,24a31.37,31.37,0,0,1,9,17l13,187c0,16-8,19-8,19l-29,24c2,46,0,84,0,84l28,21c6,5,6,15,6,15l-13,187c-1,12-7,16-7,16l-32,30a39.08,39.08,0,0,0-4,5l-121,206h0a107.12,107.12,0,0,0-6,12l-37,101a19.32,19.32,0,0,1-17,12H2868c-21,0-24-12-24-12l-37-99a123.46,123.46,0,0,0-8-18L2679,888c-4-6-12-12-12-12l-22-21c-9-9-8-19-8-19l-15-182c-1-10,4-14,4-14l30-27V532l-28-24a24.69,24.69,0,0,1-7-16l13-190c1-11,7-15,7-15l34-33c6-5,7-9,7-9L2792,52c7-10,9-18,9-18l36-111C2840-91,2855-91,2855-91Z" transform="translate(-2593.5 91)" style="fill:#333"></path>
        <path id="Contour_2" data-name="Contour 2" d="M2799,1060c18.5,26.5,37,27,37,27,455.44,18.42,790,0,790,0s24,0,41-29l86-154s16.5-20.5,20-55c30-295.67,1-557,1-557s1-17-13-47L3672,87c-14-23-37-22-37-22-389.5-13.5-809,0-809,0-29,1-37,24-37,24l-87,153a119.3,119.3,0,0,0-17,48c-24.58,335.84,3,569,3,569,4.5,16.5,17.86,37.6,17.86,37.6Z" transform="translate(-2593.5 91)" style="fill: #3d3d3d"></path>
        <g id="Contour_centre" data-name="Contour centre">
          <path d="M3712.11,308.15C3711,283,3693,258,3693,258l-43-69c-20-34-60-35-60-35-360-13-725,1-725,1-33.26,1.17-49,25-49,25l-53,84c-15,25-17,46-17,46-22,287-1,518-1,518,3,30,21,56,21,56l42,72c23,37,60,40,60,40,392,15,716.5.5,716.5.5C3633,992,3653,953,3653,953l43-73s10-13.87,13.5-43.5C3739,587,3712.11,308.15,3712.11,308.15ZM3570,728.32A34.68,34.68,0,0,1,3535.32,763H2921.68A34.68,34.68,0,0,1,2887,728.32V463.68A34.68,34.68,0,0,1,2921.68,429h613.64A34.68,34.68,0,0,1,3570,463.68Z" transform="translate(-2593.5 91)" style="fill: #333">&l.........完整代码请登录后点击上方下载按钮下载查看

网友评论0