css美化range实现飞机飞行滑竿滑块取值器代码
代码语言:html
所属分类:拖放
代码描述:css美化range实现飞机飞行滑竿滑块取值器代码
代码标签: css 美化 range 飞机 飞行 滑竿 滑块 取值器 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body {
min-height: 100vh;
margin: 0;
display: grid;
place-items: center;
background: #c2e5f9;
}
.flight-component {
--w: min(700px, 90vw);
width: var(--w);
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.5em;
font-family: Helvetica, Arial, sans-serif;
font-weight: 200;
font-size: 1.25rem;
}
/*
Didn't nest this one, in case I wanted to use the input by itself
without the div/span structure (in that case: add width!!)
*/
.flight-component input,
input.flight {
--bg: #6c6c84;
--scale: clamp(1, calc(1 + 0.5 * sin(pi * var(--val) / 100)), 2);
--shadow: clamp(0.15em, calc(1em * sin(pi * var(--val) / 100)), 1em);
--opacity: clamp(0.2, calc(1 - sin(pi * var(--val) / 100)), 0.4);
--color: rgb(0 0 0 / var(--opacit.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0