css+js实现方形时钟转动显示当前时间代码
代码语言:html
所属分类:其他
代码描述:css+js实现方形时钟转动显示当前时间代码
代码标签: css js 方形 时钟 转动 显示 当前 时间 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
:root {
--accent-000: #080e17;
--accent-100: #1ddbf3;
--accent-200: #5c53f9;
--accent-300: #c239f9;
--accent-400: #ebf681;
--squircle-bg-color: var(--accent-000);
--ring-size: 1.5rem;
font-family: system-ui;
color: var(--accent-000);
background: currentColor;
}
*, :after, :before {
box-sizing: border-box;
}
body {
height: 100vh;
margin: 0;
display: grid;
place-items: center;
}
.watch__ring {
overflow: clip;
position: relative;
min-width: 16rem;
aspect-ratio: 1/1;
padding: var(--ring-size);
background-color: var(--ring-color);
clip-path: shape(from 0% 50%, curve to 50% 0% with 0% 8%/.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0