svg+js实现2个大小齿轮相连转动动画代码
代码语言:html
所属分类:动画
代码描述:svg+js实现2个大小齿轮相连转动动画代码
代码标签: svg js 2个 大小 齿轮 相连 转动 动画 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
:root {
--bg: #adbba6;
--panel: #e6ede0;
--border: #a87c1e;
--panel-void: #e6ede0;
--ink: #1e2a1a;
--ink-muted: #5a3e10;
--rule: #a87c1e;
--centre-line: #4a7250;
--direction: #8a5c0a;
}
body {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: var(--bg);
}
.instrument-panel {
width: min(92vw, 920px);
aspect-ratio: 700 / 460;
background-color: var(--panel);
background-image: radial-gradient(circle, rgba(40, 56, 32, .07) 1px, transparent 1px);
background-size: 20px 20px;
border: 2px solid var(--border);
box-shadow: 0 2px 0 #c49828, inset 0 0 0 6px rgba(168, 124, 30, .08);
}
.instrument-panel-drawing {
display: block;
width: 100%;
height: 100%;
}
.registration-mark {
fill: none;
stroke: var(--border);
stroke-width: 1.5;
stroke-linecap: square;
}
.rule {
fill: none;
stroke: var(--rule);
stroke-width: .8;
opacity: .75;
}
.rule-primary {
fill: none;
stroke: var(--rule);
stroke-width: 2;
opacity: .9;
}
.centre-line {
fill: none;
stroke.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0