css实现input range拖动数字变化视觉差异动画效果代码
代码语言:html
所属分类:视觉差异
代码描述:css实现input range拖动数字变化视觉差异动画效果代码
代码标签: css input range 拖动 数字 变化 视觉 差异 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/reset.min.css"> <style> @import url("https://fonts.googleapis.com/css2?family=Crafty+Girls&display=swap"); html, body { height: 100%; overflow: hidden; user-select: none; font-family: "Crafty Girls", cursive; } @keyframes sketchy-jiggle { 0% { transform: rotate(0) scale(1.05); } 33% { transform: rotate(-2deg) scale(1); } 66% { transform: rotate(2deg) scale(1.07); } } #scene { height: 100%; background: linear-gradient(to bottom, color-mix(in srgb, #777, #bb9 calc(var(--camera-x) * 1%)), color-mix(in srgb, #999, #eee calc(var(--camera-x) * 1%)) 50%, #aaa 55%, color-mix(in srgb, #555, #888 calc(var(--camera-x) * 1%))); position: relative; --camera-x: 0; --camera-multiplier: -2; } #scene::after { content: ""; pointer-events: none; position: absolute; inset: 0; background-image: url("//repo.bfw.wiki/bfwrepo/image/67ccd682ef481.png"); background-size: cover; background-position: 50% 50%; mix-blend-mode: multiply; opacity: 0.4; z-index: 5000; } #scene .shape, #scene .column { --z: 100; --x: 0; --y: 50; --blur: 0; --rotate: 0deg; z-index: var(--z); filter: blur(var(--blur)); left: calc( ((var(--x) + (var(--camera-x) * var(--camera-multiplier))) * 1%) * (var(--z) * 0.05) ); translate: -50% -50%; transition: left 0.2s ease-out; position: absolute; scale: calc(var(--z) / 100); rotate: var(--rotate); } #scene .shape { font-size: 7vmin; top: calc(var(--y) * 1%); animation: 1s sketchy-jiggle infinite reverse steps(2, jump-start); color: #fff; mix-blend-mode: exclusion; } #scene .column { height: 1500px; top: 50%; border-radius: 50%/calc(var(--z) * 0.05%); width: 200px; background: color-mix(in srgb, #555, #ccc calc(100% - (var(--z) * 1%))) linear-gradient(to right, #0002 10%, #0004 40%, #0006 70%); } #scene .column::before { content: ""; position: absolute; width: 300%; translate: -33% 50%; height: 10%; bottom: 0; background: radial-gradient(#0002, #0000 50%); mix-blend-mode: multiply; rotate: calc(var(--rotate) * -1); } #scene .column::after { content: ""; position: absolute; left: 0; right: 0; z-index: calc(var(--z) - 1); rotate: calc(var(--rotate) * -2); bottom: -97%; height: 100%; filter: blur(10px); transform-origin: 50% 0; background: linear-gradient(to bottom, #0000, color-mix(in srgb, #333, #0001 calc(100% - (var(--z) * .........完整代码请登录后点击上方下载按钮下载查看
网友评论0