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&.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0