js+css实现经典带点击声效计算器代码
代码语言:html
所属分类:其他
代码描述:js+css实现经典带点击声效计算器代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> @import url("https://fonts.googleapis.com/css2?family=Abril+Fatface&display=swap"); /* Seven segment * from https://www.kraftilab.com/ */ @font-face { font-family: "Seven Segment"; src: url("//repo.bfw.wiki/bfwrepo/font/Seven+Segment.ttf"); } @font-face { font-family: "Mona Sans"; src: url("//repo.bfw.wiki/bfwrepo/font/Mona-Sans.woff2") format("woff2 supports variations"), url("//repo.bfw.wiki/bfwrepo/font/Mona-Sans.woff2") format("woff2-variations"); font-weight: 100 1000; } @supports (background: paint(something)) { @layer properties { @property --base-hue { syntax: "<number>"; inherits: true; initial-value: 0; } @property --gradient-start { syntax: "<color>"; inherits: true; initial-value: 0; } @property --gradient-stop { syntax: "<color>"; inherits: true; initial-value: 0; } @property --box-shadow-1 { syntax: "<color>"; inherits: true; initial-value: 0; } @property --box-shadow-2 { syntax: "<color>"; inherits: true; initial-value: 0; } @property --box-shadow-3 { syntax: "<color>"; inherits: true; initial-value: 0; } @property --box-shadow-4 { syntax: "<color>"; inherits: true; initial-value: 0; } @property --box-shadow-5 { syntax: "<color>"; inherits: true; initial-value: 0; } @property --inner-background-start { syntax: "<color>"; inherits: true; initial-value: 0; } @property --inner-background-stop { syntax: "<color>"; inherits: true; initial-value: 0; } @property --inner-box-shadow-1 { syntax: "<color>"; inherits: true; initial-value: 0; } @property --inner-box-shadow-2 { syntax: "<color>"; inherits: true; initial-value: 0; } @property --inner-box-shadow-3 { syntax: "<color>"; inherits: true; initial-value: 0; } @property --inner-box-shadow-4 { syntax: "<color>"; inherits: true; initial-value: 0; } @property --screen-box-shadow-1 { syntax: "<color>"; inherits: true; initial-value: 0; } @property --screen-box-shadow-2 { syntax: "<color>"; inherits: true; initial-value: 0; } } } :root { --debug: 0; --bg-color: oklch(97.02% 0 0); } *, *:before, *:after { box-sizing: border-box; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; outline: calc(var(--debug) * 1px) dotted hsl(calc(var(--debug) * 10 * 1deg), 60%, 60%); } html, body, main { width: 100%; height: 100%; margin: 0; padding: 0; } body { background-color: #f5f5f5; background-image: conic-gradient(from 90deg at 1px 1px, transparent 90deg, rgba(0, 0, 0, 0.1) 0); background-size: 8vw 8vw; font-family: "Mona Sans", sans-serif; transition: --gradient-start 0.2s ease, --gradient-stop 0.2s ease, --box-shadow-1 0.2s ease, --box-shadow-2 0.2s ease, --box-shadow- 0.2s ease, --box-shadow-4 0.2s ease, --box-shadow-5 0.2s ease, --inner-background-start 0.2s ease, --inner-background-stop 0.2s ease, --inner-box-shadow-1 0.2s ease, --inner-box-shadow-2 0.2s ease, --inner-box-shadow-3 0.2s ease, --inner-box-shadow-4 0.2s ease, --screen-box-shadow-1 0.2s ease, --screen-box-shadow-2 0.2s ease; } body:before { content: ""; display: block; position: absolute; width: 100%; height: 100%; background: radial-gradient(circle at 50% 50%, transparent 50%, rgba(7, 8, 24, 0.4)); } main { display: grid; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0